]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
CID:1087632 Resource leak
authorMichael Jerris <mike@jerris.com>
Fri, 16 May 2014 21:01:13 +0000 (21:01 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 16 May 2014 21:01:13 +0000 (21:01 +0000)
src/switch_loadable_module.c

index 0f4b0aa6e6a4ff19b21e9b7e1f56de5cbc23a958..bd49e877a00cd3eee4fe8f4d533a89cbcb6a6cb6 100644 (file)
@@ -1364,9 +1364,10 @@ static switch_status_t switch_loadable_module_load_file(char *path, char *filena
                interface_struct_handle = switch_dso_data_sym(dso, struct_name, &derr);
        }
 
-       switch_safe_free(derr)
+       switch_safe_free(derr);
 
-               if (!interface_struct_handle) {
+       if (!interface_struct_handle) {
+               if (dso) switch_dso_destroy(&dso);
                dso = switch_dso_open(path, load_global, &derr);
        }