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
This commit is contained in:
Conrad Meyer 2016-05-11 23:39:39 +00:00
parent f74fc68670
commit 6c8eb57da5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=299496

View file

@ -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 {