stasis_recording: Correct ast_asprintf error checking

ASTERISK-27021 #close
Reported by: Tim Morgan

Change-Id: I0ac061f040093e806c3b1f4e2340864f3ce4dd75
This commit is contained in:
Sean Bright
2017-05-30 17:07:56 -04:00
parent e5cd02bcb4
commit 4e2b8471e8
+2 -2
View File
@@ -175,7 +175,7 @@ static int handle_find_recording(const char *dir_name, const char *filename, voi
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;
}
@@ -270,7 +270,7 @@ static int handle_scan_file(const char *dir_name, const char *filename, void *ob
return 0;
}
if (ast_asprintf(&filepath, "%s/%s", dir_name, filename)) {
if (ast_asprintf(&filepath, "%s/%s", dir_name, filename) < 0) {
return -1;
}