git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167566
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
if (!bfile || (fs = get_filestream(f, bfile)) == NULL ||
open_wrapper(fs) ) {
ast_log(LOG_WARNING, "Unable to open %s\n", fn);
- if (fs)
- ast_free(fs);
+ if (fs) {
+ ast_closestream(fs);
+ }
fs = NULL;
- if (bfile)
- fclose(bfile);
+ bfile = NULL;
free(fn);
continue;
}
unlink(fn);
unlink(orig_fn);
}
- if (fs)
- ast_free(fs);
- fs = NULL;
+ if (fs) {
+ ast_closestream(fs);
+ fs = NULL;
+ }
continue;
}
fs->trans = NULL;