summaryrefslogtreecommitdiff
path: root/libgphoto2_port/ptpip
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2014-07-21 20:41:28 +0000
committerMarcus Meissner <marcus@jet.franken.de>2014-07-21 20:41:28 +0000
commitb04b755500defcb12d4152db13dc52fbdfa8f443 (patch)
tree8bd5e47205c448f7dfcca97bd0376db523fd5cd2 /libgphoto2_port/ptpip
parent0f3f6485c8244000428c928fa0055e52e03c62f7 (diff)
downloadlibgphoto2-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/ptpip')
-rw-r--r--libgphoto2_port/ptpip/ptpip.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libgphoto2_port/ptpip/ptpip.c b/libgphoto2_port/ptpip/ptpip.c
index 3962ef9d6..9253820b5 100644
--- a/libgphoto2_port/ptpip/ptpip.c
+++ b/libgphoto2_port/ptpip/ptpip.c
@@ -220,10 +220,8 @@ static int gp_port_ptpip_init (GPPort *dev)
static int
gp_port_ptpip_exit (GPPort *port)
{
- if (port->pl) {
- free (port->pl);
- port->pl = NULL;
- }
+ free (port->pl);
+ port->pl = NULL;
return GP_OK;
}