res_pjproject: Handle error from adding to the buildopts vector.

Change-Id: I076c7bd207c7989a23005395ce1735392657be65
This commit is contained in:
Corey Farrell
2017-11-06 18:17:13 -05:00
parent ad7860fd19
commit b96dd55add

View File

@@ -229,11 +229,16 @@ static void log_forwarder(int level, const char *data, int len)
static void capture_buildopts_cb(int level, const char *data, int len)
{
char *dup;
if (strstr(data, "Teluu") || strstr(data, "Dumping")) {
return;
}
AST_VECTOR_ADD_SORTED(&buildopts, ast_strdup(ast_skip_blanks(data)), strcmp);
dup = ast_strdup(ast_skip_blanks(data));
if (AST_VECTOR_ADD_SORTED(&buildopts, dup, strcmp)) {
ast_free(dup);
}
}
#pragma GCC diagnostic ignored "-Wformat-nonliteral"