mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 03:41:04 +00:00
Fix memory leaks in convert.c
This commit is contained in:
parent
d9bc28c4ca
commit
3b7f8f0e84
1 changed files with 6 additions and 0 deletions
|
@ -351,6 +351,8 @@ image2TrueColor(RContext *ctx, RImage *image)
|
|||
if (!err || !nerr) {
|
||||
if (nerr)
|
||||
free(nerr);
|
||||
if (err)
|
||||
free(err);
|
||||
RErrorCode = RERR_NOMEMORY;
|
||||
RDestroyXImage(ctx, ximg);
|
||||
return NULL;
|
||||
|
@ -522,6 +524,8 @@ image2PseudoColor(RContext *ctx, RImage *image)
|
|||
if (!err || !nerr) {
|
||||
if (nerr)
|
||||
free(nerr);
|
||||
if (err)
|
||||
free(err);
|
||||
RErrorCode = RERR_NOMEMORY;
|
||||
RDestroyXImage(ctx, ximg);
|
||||
return NULL;
|
||||
|
@ -757,6 +761,8 @@ image2GrayScale(RContext *ctx, RImage *image)
|
|||
if (!gerr || !ngerr) {
|
||||
if (ngerr)
|
||||
free(ngerr);
|
||||
if (gerr)
|
||||
free(gerr);
|
||||
RErrorCode = RERR_NOMEMORY;
|
||||
RDestroyXImage(ctx, ximg);
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in a new issue