mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-10 22:10:15 -05:00
Avoid leaking addr on error
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user