getparam: fix the GetStr() macro

It should return PARAM_NO_MEM if the strdup fails. Spotted by
clang-analyzer
This commit is contained in:
Daniel Stenberg 2012-07-13 23:39:25 +02:00
parent 0e24c1e921
commit ff318a6302

View File

@ -56,10 +56,11 @@
free(*(str)); \
*(str) = NULL; \
} \
if((val)) \
if((val)) { \
*(str) = strdup((val)); \
if(!(val)) \
if(!(*(str))) \
return PARAM_NO_MEM; \
} \
} WHILE_FALSE
struct LongShort {