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 17:27:12 +0300 |
commit | a50fc25bf34adcf4ad1db8b62aa6eee6ccbdd68c (patch) | |
tree | f810e105e0c8736137efe96c9df78e53287b5bb2 /mi | |
parent | 04328d1dbb7085f5f694669c4ead8643c3a102e3 (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>
Diffstat (limited to 'mi')
-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; |