mirror of
https://github.com/systemd/systemd.git
synced 2024-11-06 08:26:52 +03:00
pull-dkr: fix memleak
This commit is contained in:
parent
2c4fb0eab8
commit
6d9bad91d7
@ -1246,7 +1246,7 @@ finish:
|
|||||||
|
|
||||||
static int get_protocol_address(char **protocol, char **address, const char *url) {
|
static int get_protocol_address(char **protocol, char **address, const char *url) {
|
||||||
const char *sep, *dot;
|
const char *sep, *dot;
|
||||||
char *a, *p;
|
_cleanup_free_ char *a = NULL, *p = NULL;
|
||||||
|
|
||||||
sep = strstr(url, "://");
|
sep = strstr(url, "://");
|
||||||
if (!sep)
|
if (!sep)
|
||||||
@ -1270,6 +1270,7 @@ static int get_protocol_address(char **protocol, char **address, const char *url
|
|||||||
|
|
||||||
*address = a;
|
*address = a;
|
||||||
*protocol = p;
|
*protocol = p;
|
||||||
|
a = p = NULL;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user