summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2017-11-07 06:56:08 -0600
committerRichard Mudgett <rmudgett@digium.com>2017-11-07 08:11:20 -0500
commitabb77faae7680b48b619998c0cbcfbeef67cb273 (patch)
tree86ca178259fb4d65cc59da82fa3029b99a83def9 /res
parentc25fd6c982461173c764411f56cc4ec9d118c469 (diff)
res_pjproject.c: Fix ast_strdup() alloc failure.
Change-Id: I74688038e7afe3a279359cce53aadb28ade51ead
Diffstat (limited to 'res')
-rw-r--r--res/res_pjproject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_pjproject.c b/res/res_pjproject.c
index 86b2502e5..6137898a3 100644
--- a/res/res_pjproject.c
+++ b/res/res_pjproject.c
@@ -234,7 +234,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);
}
}