From: Anas Nashif Date: Sat, 8 Dec 2012 08:34:11 +0000 (-0800) Subject: applying bash42-011 X-Git-Tag: accepted/trunk/20130318.201842~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f81c398469dd6aadea8480afedfe83a94f82a50f;p=platform%2Fupstream%2Fbash.git applying bash42-011 --- diff --git a/assoc.c b/assoc.c index bbc7b17..4561de4 100644 --- a/assoc.c +++ b/assoc.c @@ -77,6 +77,11 @@ assoc_insert (hash, key, value) b = hash_search (key, hash, HASH_CREATE); if (b == 0) return -1; + /* If we are overwriting an existing element's value, we're not going to + use the key. Nothing in the array assignment code path frees the key + string, so we can free it here to avoid a memory leak. */ + if (b->key != key) + free (key); FREE (b->data); b->data = value ? savestring (value) : (char *)0; return (0); diff --git a/patchlevel.h b/patchlevel.h index 69439cb..915746d 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -25,6 +25,6 @@ regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh looks for to find the patch level (for the sccs version string). */ -#define PATCHLEVEL 10 +#define PATCHLEVEL 11 #endif /* _PATCHLEVEL_H_ */