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

Joshua Colp asteriskteam at digium.com
Mon Nov 20 10:22:08 CST 2017


Joshua Colp has submitted this change and it was merged. ( 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(-)

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

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: I8ac2a5755bf4174d89ef893e924c940f702b104e
Gerrit-Change-Number: 7278
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/521a0e9a/attachment-0001.html>


More information about the asterisk-code-review mailing list