Merge pull request #2430 from ianyfan/socketpath-leaks

Fix memory leaks in get_socketpath
master
Drew DeVault 6 years ago committed by GitHub
commit 1818c58e40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -25,6 +25,7 @@ char *get_socketpath(void) {
if (line && *line) {
return line;
}
free(line);
}
const char *i3sock = getenv("I3SOCK");
if (i3sock) {
@ -37,6 +38,7 @@ char *get_socketpath(void) {
if (line && *line) {
return line;
}
free(line);
}
return NULL;
}

Loading…
Cancel
Save