diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2014-07-21 20:41:28 +0000 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2014-07-21 20:41:28 +0000 |
commit | b04b755500defcb12d4152db13dc52fbdfa8f443 (patch) | |
tree | 8bd5e47205c448f7dfcca97bd0376db523fd5cd2 /libgphoto2_port/disk | |
parent | 0f3f6485c8244000428c928fa0055e52e03c62f7 (diff) | |
download | libgphoto2-b04b755500defcb12d4152db13dc52fbdfa8f443.tar.gz |
From: Axel Waggershauser <awagger@web.de>
2) don't check the pointer for NULL before calling free(), because
free() checks it again.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15097 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'libgphoto2_port/disk')
-rw-r--r-- | libgphoto2_port/disk/disk.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libgphoto2_port/disk/disk.c b/libgphoto2_port/disk/disk.c index 092464b54..d6c936e29 100644 --- a/libgphoto2_port/disk/disk.c +++ b/libgphoto2_port/disk/disk.c @@ -307,10 +307,8 @@ static int gp_port_disk_init (GPPort *dev) static int gp_port_disk_exit (GPPort *port) { - if (port->pl) { - free (port->pl); - port->pl = NULL; - } + free (port->pl); + port->pl = NULL; return GP_OK; } |