commit | 534e19ca4a2646911326bcd4a7f71988a5b9c41f | [log] [tgz] |
---|---|---|
author | Erwan Velu <erwan.velu@enovance.com> | Thu Feb 19 13:09:09 2015 +0100 |
committer | Mohamad Ayyash <mkayyash@google.com> | Fri Mar 06 17:58:17 2015 -0800 |
tree | c52318d9758b39317b1664330aacd7cf065ba0a4 | |
parent | a8ad8ddc987c2c50c69ec070ed7e7e62500f34a5 [diff] |
axmap: Avoid memory leak if axmap_new() failed The axmap_new() function implements an exit path using the label "err" to free the alloced memory. That cleanup code was cleaning all the sub malloc structures but not the main structure (axmap) itself resulting in a memory leak of sizeof(struct axmap) bytes. This simple patch just free axmap at the end of the cleanup code.