diff --git a/res/res_pjproject.c b/res/res_pjproject.c index c2f7c843d7..16fe01aa48 100644 --- a/res/res_pjproject.c +++ b/res/res_pjproject.c @@ -236,7 +236,7 @@ static void capture_buildopts_cb(int level, const char *data, int len) } dup = ast_strdup(ast_skip_blanks(data)); - if (AST_VECTOR_ADD_SORTED(&buildopts, dup, strcmp)) { + if (dup && AST_VECTOR_ADD_SORTED(&buildopts, dup, strcmp)) { ast_free(dup); } }