[Asterisk-code-review] res pjproject.c: Fix ast strdup() alloc failure. (asterisk[13])
Richard Mudgett
asteriskteam at digium.com
Tue Nov 7 07:10:54 CST 2017
Richard Mudgett has uploaded this change for review. ( https://gerrit.asterisk.org/7087
Change subject: res_pjproject.c: Fix ast_strdup() alloc failure.
......................................................................
res_pjproject.c: Fix ast_strdup() alloc failure.
Change-Id: I74688038e7afe3a279359cce53aadb28ade51ead
---
M res/res_pjproject.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/87/7087/1
diff --git a/res/res_pjproject.c b/res/res_pjproject.c
index c2f7c84..16fe01a 100644
--- a/res/res_pjproject.c
+++ b/res/res_pjproject.c
@@ -236,7 +236,7 @@
}
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);
}
}
--
To view, visit https://gerrit.asterisk.org/7087
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: I74688038e7afe3a279359cce53aadb28ade51ead
Gerrit-Change-Number: 7087
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171107/8226e1fb/attachment-0001.html>
More information about the asterisk-code-review
mailing list