From: Corey Farrell Date: Sun, 19 Nov 2017 01:29:16 +0000 (-0500) Subject: app_minivm: Fix possible uninitialized return value. X-Git-Tag: 13.19.0-rc1~114^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3dca4c774201d8b0eca5b9ecf34ffd1db53a200c;p=thirdparty%2Fasterisk.git app_minivm: Fix possible uninitialized return value. Declare 'res' initialized to -1 to deal with earlier error paths that could cause 'res' to be returned uninitialized. Change-Id: I8ac2a5755bf4174d89ef893e924c940f702b104e --- diff --git a/apps/app_minivm.c b/apps/app_minivm.c index 6b1e8bb836..dcf0ee2fa1 100644 --- a/apps/app_minivm.c +++ b/apps/app_minivm.c @@ -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;