diff options
author | Tiago Vignatti <tiago.vignatti@nokia.com> | 2011-03-29 16:48:21 +0300 |
---|---|---|
committer | Tiago Vignatti <tiago.vignatti@nokia.com> | 2011-04-04 15:47:58 +0300 |
commit | 90e03ab026cd8ffdc6202e6b8bae119717ee8528 (patch) | |
tree | 64171a4cd442906df1f76a8245d4360dd12ffc62 | |
parent | daae5e5de194757f7084f9b2b24353c34b961f19 (diff) |
mi: fix memory leak in miZeroLine
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
-rw-r--r-- | mi/mizerline.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mi/mizerline.c b/mi/mizerline.c index 07cfbe113..7077b5198 100644 --- a/mi/mizerline.c +++ b/mi/mizerline.c @@ -157,9 +157,11 @@ miZeroLine( list_len = (height >= width) ? height : width; pspanInit = malloc(list_len * sizeof(DDXPointRec)); pwidthInit = malloc(list_len * sizeof(int)); - if (!pspanInit || !pwidthInit) + if (!pspanInit || !pwidthInit) { + free(pspanInit); + free(pwidthInit); return; - + } Nspans = 0; new_span = TRUE; spans = pspanInit - 1; |