]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10100: [mod_av] fix crash on allocation error and other error cases opening a...
authorMike Jerris <mike@jerris.com>
Mon, 10 Apr 2017 18:15:59 +0000 (13:15 -0500)
committerMike Jerris <mike@jerris.com>
Mon, 10 Apr 2017 18:15:59 +0000 (13:15 -0500)
src/mod/applications/mod_av/avformat.c

index 8580065255b8d3a7a708f49756aaaed5f87f0766..a724a8668724534d42312962c75b9ea032d2bdde 100644 (file)
@@ -1953,7 +1953,11 @@ static switch_status_t av_file_open(switch_file_handle_t *handle, const char *pa
 
  end:
 
-       if (context && context->fc) {
+       if (!context) {
+               return status;
+       }
+
+       if (context->fc) {
                mod_avformat_destroy_output_context(context);
        }