Skip to content

Commit

Permalink
free the right pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
msmeissn committed Oct 27, 2024
1 parent 2e36b40 commit fe22fef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion camlibs/ptp2/ptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -4073,7 +4073,7 @@ ptp_canon_getviewfinderimage (PTPParams* params, unsigned char** image, uint32_t
CHECK_PTP_RC(ptp_transaction(params, &ptp, PTP_DP_GETDATA, 0, image, &datasize));
if (ptp.Param1 > datasize) {
ptp_debug (params, "param1 is %d, but size is only %d", ptp.Param1, datasize);
free(image);
free(*image);
return PTP_RC_GeneralError;
}
*size=ptp.Param1;
Expand Down

0 comments on commit fe22fef

Please sign in to comment.