https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r66076 | russell | 2007-05-24 17:23:59 -0500 (Thu, 24 May 2007) | 1 line
if the string field init fails, clean up the stuff that was allocated already
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@66077
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
return NULL;
}
- if ((ast_string_field_init(tmp, 128)))
+ if ((ast_string_field_init(tmp, 128))) {
+ sched_context_destroy(tmp->sched);
+ free(tmp);
return NULL;
+ }
/* Don't bother initializing the last two FD here, because they
will *always* be set just a few lines down (AST_TIMING_FD,