Skip to content

Commit

Permalink
Fix use-after-not-created for photos
Browse files Browse the repository at this point in the history
Fix reported by @spaeps in majn/telegram-purple#238
Closes vysheng#42
I didn't actually do anything, except forward this patch.
  • Loading branch information
BenWiederhake authored and majn committed Feb 27, 2016
1 parent e03d95b commit bec66c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion structures.c
Original file line number Diff line number Diff line change
Expand Up @@ -1966,7 +1966,7 @@ void tgls_free_message_media (struct tgl_state *TLS, struct tgl_message_media *M
case tgl_message_media_geo:
return;
case tgl_message_media_photo:
tgls_free_photo (TLS, M->photo);
if (M->photo) { tgls_free_photo (TLS, M->photo); }
if (M->caption) { tfree_str (M->caption); }
M->photo = NULL;
return;
Expand Down

0 comments on commit bec66c2

Please sign in to comment.