]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-9201 [mod_skinny] fix leak in api call to list devices
authornneul at mst.edu <nneul@mst.edu>
Wed, 25 May 2016 18:57:46 +0000 (13:57 -0500)
committernneul at mst.edu <nneul@mst.edu>
Wed, 25 May 2016 18:57:46 +0000 (13:57 -0500)
src/mod/endpoints/mod_skinny/skinny_api.c

index aba3abf97a14fbb83924274a4e15e5a6c5c13736..f9f734f6308752adf4dcdf7d880b30ceb29cd9b1 100644 (file)
@@ -94,6 +94,7 @@ static switch_status_t skinny_api_list_devices(const char *line, const char *cur
                return status;
        }
        if (!(argc = switch_separate_string(myline, ' ', argv, (sizeof(argv) / sizeof(argv[0])))) || argc < 4) {
+               switch_safe_free(myline);
                return status;
        }
 
@@ -115,6 +116,8 @@ static switch_status_t skinny_api_list_devices(const char *line, const char *cur
                status = SWITCH_STATUS_SUCCESS;
        }
 
+       switch_safe_free(myline);
+
        return status;
 }