From 19855d6e09aa36db7686ad6f538179bf87e9c6ea Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 2 Jun 2006 19:48:01 +0000 Subject: Coverity #1432: Returned without freeing storage "hints_cmt" (in error case when xpmHashTableInit failed) --- ChangeLog | 4 ++++ src/create.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8f2928d..fd1a686 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-06-02 Alan Coopersmith + * src/create.c (xpmParseDataAndCreate): + Coverity #1432: Returned without freeing storage "hints_cmt" + (in error case when xpmHashTableInit failed) + * src/parse.c (xpmParseData): Coverity #1415: Returned without freeing storage "hints_cmt" (in error case when xpmHashTableInit failed) diff --git a/src/create.c b/src/create.c index abc9d59..e3179f7 100644 --- a/src/create.c +++ b/src/create.c @@ -1,4 +1,4 @@ -/* $XdotOrg: xc/extras/Xpm/lib/create.c,v 1.4 2004/11/25 21:19:11 herrb Exp $ */ +/* $XdotOrg: lib/Xpm/src/create.c,v 1.6 2005/05/19 15:02:48 sandmann Exp $ */ /* * Copyright (C) 1989-95 GROUPE BULL * @@ -2080,12 +2080,12 @@ xpmParseDataAndCreate(display, data, image_return, shapeimage_return, xpmGetCmt(data, &hints_cmt); /* - * init the hastable + * init the hashtable */ if (USE_HASHTABLE) { ErrorStatus = xpmHashTableInit(&hashtable); if (ErrorStatus != XpmSuccess) - return (ErrorStatus); + RETURN(ErrorStatus); } /* -- cgit v1.2.1