diff options
author | Matthias Clasen <mclasen@redhat.com> | 2007-03-09 21:57:37 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2007-03-09 21:57:37 +0000 |
commit | 82ce59cd0fd65f4d3b13dc4c305fc6d8ec44a12c (patch) | |
tree | 59d060f22217bda52a711dbada1b7c771ddca617 /gdk-pixbuf/io-tga.c | |
parent | a1e455446281f6a6a1a4eac14cd064cd9cfa93a7 (diff) | |
download | gtk+-82ce59cd0fd65f4d3b13dc4c305fc6d8ec44a12c.tar.gz |
Remove unnecessary NULL checks before g_free(). (#369666, Morten Welinder,
2007-03-09 Matthias Clasen <mclasen@redhat.com>
* Everywhere: Remove unnecessary NULL checks before
g_free(). (#369666, Morten Welinder, Djihed Afifi)
* configure.in: Check for ftw.h
svn path=/trunk/; revision=17444
Diffstat (limited to 'gdk-pixbuf/io-tga.c')
-rw-r--r-- | gdk-pixbuf/io-tga.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gdk-pixbuf/io-tga.c b/gdk-pixbuf/io-tga.c index 79c661c01f..963c3a6870 100644 --- a/gdk-pixbuf/io-tga.c +++ b/gdk-pixbuf/io-tga.c @@ -228,8 +228,7 @@ static IOBuffer *io_buffer_free_segment(IOBuffer *buffer, static void io_buffer_free(IOBuffer *buffer) { g_return_if_fail(buffer != NULL); - if (buffer->data) - g_free(buffer->data); + g_free(buffer->data); g_free(buffer); } @@ -943,11 +942,9 @@ static gboolean gdk_pixbuf__tga_stop_load(gpointer data, GError **err) ctx->pbuf->width, ctx->pbuf->height, ctx->udata); } - if (ctx->hdr) - g_free (ctx->hdr); + g_free (ctx->hdr); if (ctx->cmap) { - if (ctx->cmap->cols) - g_free (ctx->cmap->cols); + g_free (ctx->cmap->cols); g_free (ctx->cmap); } if (ctx->pbuf) |