[systemd-commits] src/libsystemd-network
Tom Gundersen
tomegun at kemper.freedesktop.org
Tue Sep 16 07:20:54 PDT 2014
src/libsystemd-network/network-internal.c | 1 -
1 file changed, 1 deletion(-)
New commits:
commit 2833796106420e4634543d06052482f75cbb5762
Author: Andreas Henriksson <andreas at fatal.se>
Date: Tue Sep 16 15:50:58 2014 +0200
libsystemd-network: avoid double-free in error case
Don't manually free 'n' in error path as it's already tagged
_cleanup_free_ and will be freed once it goes out of scope,
leading to double-free in this case.
Found with coverity. Fixes: CID#1237786
diff --git a/src/libsystemd-network/network-internal.c b/src/libsystemd-network/network-internal.c
index 208c314..372f3ed 100644
--- a/src/libsystemd-network/network-internal.c
+++ b/src/libsystemd-network/network-internal.c
@@ -199,7 +199,6 @@ int config_parse_ifname(const char *unit,
if (!ascii_is_valid(n) || strlen(n) >= IFNAMSIZ) {
log_syntax(unit, LOG_ERR, filename, line, EINVAL,
"Interface name is not ASCII clean or is too long, ignoring assignment: %s", rvalue);
- free(n);
return 0;
}
More information about the systemd-commits
mailing list