]> granicus.if.org Git - rtmpdump/commit
Simplify the logic for freeing reused strings in RTMP_Close
authorMartin Storsjo <martin@martin.st>
Sat, 5 Jul 2014 21:58:26 +0000 (00:58 +0300)
committerMartin Storsjo <martin@martin.st>
Mon, 7 Jul 2014 07:15:59 +0000 (10:15 +0300)
commit4444f20554534a91b31b03399f9a695f410b4ae6
tree313fa3b2eb303367cd01a0d28515c7c71de72949
parent0226b868539463e27dead0892bb48493ddcd0337
Simplify the logic for freeing reused strings in RTMP_Close

Instead of having a plethora of flags indicating the current
state (just to avoid freeing them when closing the previous
connection when reconnecting), split RTMP_Close into CloseInternal,
taking a flag saying whether this is a reconnect or a normal,
final RTMP_Close call.

This also avoids leaks of some strings, if the whole session is
closed while the authentication process is underway.
librtmp/rtmp.c
librtmp/rtmp.h