[Asterisk-code-review] app minivm: Fix possible uninitialized return value. (asterisk[15])

Corey Farrell asteriskteam at digium.com
Sat Nov 18 19:36:59 CST 2017


Corey Farrell has uploaded this change for review. ( https://gerrit.asterisk.org/7278


Change subject: app_minivm: Fix possible uninitialized return value.
......................................................................

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
---
M apps/app_minivm.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/78/7278/1

diff --git a/apps/app_minivm.c b/apps/app_minivm.c
index 0d7a5f4..8f920e0 100644
--- a/apps/app_minivm.c
+++ b/apps/app_minivm.c
@@ -1252,7 +1252,7 @@
 	struct ast_channel *chan = NULL;
 	char *fromaddress;
 	char *fromemail;
-	int res;
+	int res = -1;
 
 	if (!str1 || !str2) {
 		return -1;

-- 
To view, visit https://gerrit.asterisk.org/7278
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ac2a5755bf4174d89ef893e924c940f702b104e
Gerrit-Change-Number: 7278
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171118/a8ef8970/attachment.html>


More information about the asterisk-code-review mailing list