shared/frame: fix potential memory leak in frame_create
authorU. Artie Eoff <ullysses.a.eoff@intel.com>
Fri, 17 Jan 2014 19:19:46 +0000 (11:19 -0800)
committerKristian Høgsberg <krh@bitplanet.net>
Mon, 20 Jan 2014 06:07:07 +0000 (22:07 -0800)
commit107de96ba758228cb5814967d1cf642e042ab070
tree4bb87e6392f0919cc4d0d257146bf48367ad7b3b
parentcf5737aa41fea485dec4eba26a51703887ae2a40
shared/frame: fix potential memory leak in frame_create

In frame_create, we need to destroy any frame buttons created
in preceding calls to frame_button_create during the function
execution if any of the successive calls to frame_button_create
fail.

This has minimal severity since most, if not all, cases in
frame_button_create that result in a fail (i.e. NULL result) means
a program is OOM and the program will have to exit/abort anyway.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
shared/frame.c