]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_voicemail] Fix error-case return in vm_fsdb_pref_greeting_set_function
authorMartin Paterson <61424351+MartinJPaterson@users.noreply.github.com>
Wed, 16 Dec 2020 14:22:46 +0000 (14:22 +0000)
committerGitHub <noreply@github.com>
Wed, 16 Dec 2020 14:22:46 +0000 (18:22 +0400)
src/mod/applications/mod_voicemail/mod_voicemail.c

index 6ef8bf37e7693a5feb8df0dbcb77f03316233479..aba1dc4cf0f7947580423d648ac099ff4551fbd0 100644 (file)
@@ -5146,6 +5146,8 @@ SWITCH_STANDARD_API(vm_fsdb_pref_greeting_set_function)
                        switch_safe_free(sql);
                } else {
                        stream->write_function(stream, "-ERR Recording doesn't exist [%s]\n", final_file_path);
+                       profile_rwunlock(profile);
+                       goto done;
                }
                profile_rwunlock(profile);
        }