[Asterisk-code-review] stasis recording: Correct ast asprintf error checking (asterisk[master])

Sean Bright asteriskteam at digium.com
Tue May 30 16:09:51 CDT 2017


Sean Bright has uploaded a new change for review. ( https://gerrit.asterisk.org/5741 )

Change subject: stasis_recording: Correct ast_asprintf error checking
......................................................................

stasis_recording: Correct ast_asprintf error checking

ASTERISK-27021 #close
Reported by: Tim Morgan

Change-Id: I0ac061f040093e806c3b1f4e2340864f3ce4dd75
---
M res/stasis_recording/stored.c
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/41/5741/1

diff --git a/res/stasis_recording/stored.c b/res/stasis_recording/stored.c
index 23d5356..9df5d75 100644
--- a/res/stasis_recording/stored.c
+++ b/res/stasis_recording/stored.c
@@ -173,7 +173,7 @@
 		return 0;
 	}
 
-	if (ast_asprintf(&data->file_with_ext, "%s/%s", dir_name, filename)) {
+	if (ast_asprintf(&data->file_with_ext, "%s/%s", dir_name, filename) < 0) {
 		return -1;
 	}
 
@@ -268,7 +268,7 @@
 		return 0;
 	}
 
-	if (ast_asprintf(&filepath, "%s/%s", dir_name, filename)) {
+	if (ast_asprintf(&filepath, "%s/%s", dir_name, filename) < 0) {
 		return -1;
 	}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0ac061f040093e806c3b1f4e2340864f3ce4dd75
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>



More information about the asterisk-code-review mailing list