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

Joshua Colp asteriskteam at digium.com
Mon Nov 20 10:39:16 CST 2017


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/7277 )

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(-)

Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved; Approved for Submit



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/7277
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I8ac2a5755bf4174d89ef893e924c940f702b104e
Gerrit-Change-Number: 7277
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171120/1172a686/attachment-0001.html>


More information about the asterisk-code-review mailing list