Skip to content

Commit fe22fef

Browse files
committed
free the right pointer
1 parent 2e36b40 commit fe22fef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

camlibs/ptp2/ptp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4073,7 +4073,7 @@ ptp_canon_getviewfinderimage (PTPParams* params, unsigned char** image, uint32_t
40734073
CHECK_PTP_RC(ptp_transaction(params, &ptp, PTP_DP_GETDATA, 0, image, &datasize));
40744074
if (ptp.Param1 > datasize) {
40754075
ptp_debug (params, "param1 is %d, but size is only %d", ptp.Param1, datasize);
4076-
free(image);
4076+
free(*image);
40774077
return PTP_RC_GeneralError;
40784078
}
40794079
*size=ptp.Param1;

0 commit comments

Comments
 (0)