diff options
author | cem <cem@FreeBSD.org> | 2016-05-11 23:39:39 +0000 |
---|---|---|
committer | cem <cem@FreeBSD.org> | 2016-05-11 23:39:39 +0000 |
commit | b085e42af010174e13eeff51f0ace89eca34e8eb (patch) | |
tree | 361c730c36d19d43037ff66b67a1f02612460357 /contrib/atf/atf-c | |
parent | 2bcae162c5c82322e1d0a8c205a96505ca3367b1 (diff) | |
download | FreeBSD-src-b085e42af010174e13eeff51f0ace89eca34e8eb.zip FreeBSD-src-b085e42af010174e13eeff51f0ace89eca34e8eb.tar.gz |
atf map: Fix double-free in low memory error path
If atf_list_append(, X, ) fails, X is freed. Don't free it again.
If anyone wants to walk this patch upstream, be my guest. I literally cannot
upstream it myself due to Google's stupid CLA.
Reported by: Coverity
CID: 979936
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'contrib/atf/atf-c')
-rw-r--r-- | contrib/atf/atf-c/detail/map.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/contrib/atf/atf-c/detail/map.c b/contrib/atf/atf-c/detail/map.c index 34aaae2..ae11a44 100644 --- a/contrib/atf/atf-c/detail/map.c +++ b/contrib/atf/atf-c/detail/map.c @@ -360,7 +360,6 @@ atf_map_insert(atf_map_t *m, const char *key, void *value, bool managed) if (atf_is_error(err)) { if (managed) free(value); - free(me); } } } else { |