Avoid leaking addr on error

This commit is contained in:
Julien BLACHE 2011-03-10 20:27:51 +01:00
parent eeb5a7974d
commit 09a981807b
1 changed files with 1 additions and 0 deletions

View File

@ -1263,6 +1263,7 @@ evrtsp_connection_new(const char *address, unsigned short port)
event_debug(("Attempting connection to %s:%d\n", address, port));
if ((evcon = calloc(1, sizeof(struct evrtsp_connection))) == NULL) {
free(addr);
event_warn("%s: calloc failed", __func__);
goto error;
}