Skip to content

Commit

Permalink
free opcodes and devprops (Coverity)
Browse files Browse the repository at this point in the history
  • Loading branch information
msmeissn committed Jan 10, 2016
1 parent 64b2c26 commit 05afc51
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libgphoto2_port/vusb/vcamera.c
Expand Up @@ -501,6 +501,7 @@ ptp_deviceinfo_write(vcamera *cam, ptpcontainer *ptp) {
for (i=0;i<sizeof(ptp_functions)/sizeof(ptp_functions[0]);i++)
opcodes[i] = ptp_functions[i].code;
x += put_16bit_le_array(data+x,opcodes,sizeof(ptp_functions)/sizeof(ptp_functions[0])); /* OperationsSupported */
free (opcodes);

events[0] = 0x4002;
events[1] = 0x4003;
Expand All @@ -513,6 +514,7 @@ ptp_deviceinfo_write(vcamera *cam, ptpcontainer *ptp) {
for (i=0;i<sizeof(ptp_properties)/sizeof(ptp_properties[0]);i++)
devprops[i] = ptp_properties[i].code;
x += put_16bit_le_array(data+x,devprops,sizeof(ptp_properties)/sizeof(ptp_properties[0]));/* DevicePropertiesSupported */
free (devprops);

imageformats[0] = 0x3801;
x += put_16bit_le_array(data+x,imageformats,1); /* CaptureFormats */
Expand Down

0 comments on commit 05afc51

Please sign in to comment.