]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_minivm: Fix possible uninitialized return value.
authorCorey Farrell <git@cfware.com>
Sun, 19 Nov 2017 01:29:16 +0000 (20:29 -0500)
committerCorey Farrell <git@cfware.com>
Sun, 19 Nov 2017 01:37:06 +0000 (19:37 -0600)
Declare 'res' initialized to -1 to deal with earlier error paths that
could cause 'res' to be returned uninitialized.

Change-Id: I8ac2a5755bf4174d89ef893e924c940f702b104e

apps/app_minivm.c

index 6b1e8bb836d6281605fd90ad1656481a169f703b..dcf0ee2fa1bd79c77538c144d6e9e565bd7f6383 100644 (file)
@@ -1254,7 +1254,7 @@ static int sendmail(struct minivm_template *template, struct minivm_account *vmu
        struct ast_channel *chan = NULL;
        char *fromaddress;
        char *fromemail;
-       int res;
+       int res = -1;
 
        if (!str1 || !str2) {
                return -1;