only free objectinfo when we got a new one, https://github.com/gphoto/gphoto2/issues/493

This commit is contained in:
Marcus Meissner
2022-03-20 11:17:40 +01:00
parent 0715318cf8
commit 12ce4ce163

View File

@@ -3691,8 +3691,8 @@ enable_liveview:
usleep(50*1000);
continue;
}
ptp_free_objectinfo(&oi);
if (ret == PTP_RC_OK)
ptp_free_objectinfo(&oi);
ret = ptp_getobject_with_size(params, preview_object, &ximage, &size);
if (ret == PTP_RC_OK)