mirror of
https://github.com/owntone/owntone-server.git
synced 2025-03-31 09:43:45 -04:00
Avoid leaking addr on error
This commit is contained in:
parent
eeb5a7974d
commit
09a981807b
@ -1263,6 +1263,7 @@ evrtsp_connection_new(const char *address, unsigned short port)
|
|||||||
event_debug(("Attempting connection to %s:%d\n", address, port));
|
event_debug(("Attempting connection to %s:%d\n", address, port));
|
||||||
|
|
||||||
if ((evcon = calloc(1, sizeof(struct evrtsp_connection))) == NULL) {
|
if ((evcon = calloc(1, sizeof(struct evrtsp_connection))) == NULL) {
|
||||||
|
free(addr);
|
||||||
event_warn("%s: calloc failed", __func__);
|
event_warn("%s: calloc failed", __func__);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user