projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
60d0004
)
check for OOM. Found by PVS-Studio
author
Alan T. DeKok
<aland@freeradius.org>
Wed, 17 May 2017 15:41:57 +0000
(11:41 -0400)
committer
Alan T. DeKok
<aland@freeradius.org>
Fri, 19 May 2017 18:06:53 +0000
(14:06 -0400)
src/main/modcall.c
patch
|
blob
|
history
diff --git
a/src/main/modcall.c
b/src/main/modcall.c
index
594c2f7
..
c385db2
100644
(file)
--- a/
src/main/modcall.c
+++ b/
src/main/modcall.c
@@
-2095,7
+2095,12
@@
static modcallable *do_compile_modxlat(modcallable *parent,
memcpy(csingle->actions, defaultactions[component][GROUPTYPE_SIMPLE],
sizeof(csingle->actions));
- mx->xlat_name = strdup(fmt);
+ mx->xlat_name = talloc_strdup(mx, fmt);
+ if (!mx->xlat_name) {
+ talloc_free(mx);
+ return NULL;
+ }
+
if (fmt[0] != '%') {
char *p;
mx->exec = true;