1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-12 04:25:08 -05:00

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)) \
return PARAM_NO_MEM; \
if(!(*(str))) \
return PARAM_NO_MEM; \
} \
} WHILE_FALSE
struct LongShort {