From: Russell Bryant Date: Wed, 7 Jan 2009 22:03:59 +0000 (+0000) Subject: Don't use free() directly. This caused a crash since ast_filestream is now an ao2... X-Git-Tag: 1.4.23-testing~2^2~31 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c67d1525258239b8c54c627e76239f03274b496a;p=thirdparty%2Fasterisk.git Don't use free() directly. This caused a crash since ast_filestream is now an ao2 object. 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 --- diff --git a/main/file.c b/main/file.c index cfa5bf3304..65bf0dbe3b 100644 --- a/main/file.c +++ b/main/file.c @@ -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 */