Commit ff318a63 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

getparam: fix the GetStr() macro

It should return PARAM_NO_MEM if the strdup fails. Spotted by
clang-analyzer
parent 0e24c1e9
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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 {