memory leaks: Memory leak cleanup patch by Corey Farrell (second set)

Also covers ast_app_parse_timelen-fail-zero-length.patch, but the patch was
replaced with one of my own.

(issue ASTERISK-22467)
Reported by: Corey Farrell
Patches:
    chan_dahdi-cleanup_push.patch uploaded by coreyfarrell (license 5909)
    clicompat-r2.patch uploaded by coreyfarrell (license 5909)
    codecs-ilbc-doCPLC.patch uploaded by coreyfarrell (license 5909)
    data-cleanup-test-registration.patch uploaded by coreyfarrell (license 5909)
    main-asterisk-kill-listener.patch uploaded by coreyfarrell (license 5909)
........

Merged revisions 401704 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 401705 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 401706 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@401707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Jonathan Rose
2013-10-24 17:00:27 +00:00
parent beb5cdbef5
commit 4ca0f222e8
6 changed files with 28 additions and 4 deletions

View File

@@ -2786,7 +2786,9 @@ int ast_app_parse_timelen(const char *timestr, int *result, enum ast_timelen uni
return -1;
}
if ((res = sscanf(timestr, FMT, &amount, u)) == 0) {
res = sscanf(timestr, FMT, &amount, u);
if (res == 0 || res == EOF) {
#undef FMT
return -1;
} else if (res == 2) {