]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't use free() directly. This caused a crash since ast_filestream is now an ao2...
authorRussell Bryant <russell@russellbryant.com>
Wed, 7 Jan 2009 22:03:59 +0000 (22:03 +0000)
committerRussell Bryant <russell@russellbryant.com>
Wed, 7 Jan 2009 22:03:59 +0000 (22:03 +0000)
Reported by JunK-Y on IRC, #asterisk-dev

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167541 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/file.c

index cfa5bf3304ab7b11a316496271d24d6afdae0a5f..65bf0dbe3bfc26c373c3f064718cd4765da0913d 100644 (file)
@@ -468,7 +468,7 @@ static int ast_filehelper(const char *filename, const void *arg2, const char *fm
                                if (open_wrapper(s)) {
                                        fclose(bfile);
                                        free(fn);
-                                       free(s);
+                                       ast_closestream(s);
                                        continue;       /* cannot run open on file */
                                }
                                /* ok this is good for OPEN */