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

Corey Farrell asteriskteam at digium.com
Sat Nov 18 19:37:07 CST 2017


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


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/79/7279/1

diff --git a/apps/app_minivm.c b/apps/app_minivm.c
index 6b1e8bb..dcf0ee2 100644
--- a/apps/app_minivm.c
+++ b/apps/app_minivm.c
@@ -1254,7 +1254,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/7279
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ac2a5755bf4174d89ef893e924c940f702b104e
Gerrit-Change-Number: 7279
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/f27173d4/attachment.html>


More information about the asterisk-code-review mailing list