gp_list_unref can never free the list due to bad checking.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9971 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
@@ -143,11 +143,10 @@ gp_list_unref (CameraList *list)
|
||||
{
|
||||
CHECK_LIST (list);
|
||||
|
||||
list->ref_count--;
|
||||
|
||||
if (!list->ref_count)
|
||||
if (list->ref_count == 1) /* time to free */
|
||||
gp_list_free (list);
|
||||
|
||||
else
|
||||
list->ref_count--;
|
||||
return (GP_OK);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user