Fix possible memory leak in runScript.c
This was reported by cppcheck over require's code: require-ess/src/runScript.c:128:12: error: Common realloc mistake: 'line_raw' nulled but not freed upon failure [memleakOnRealloc] if ((line_raw = realloc(line_raw, line_raw_size *= 2)) == NULL) ^ Unfortunately realloc can return null, in that case if we use something like line_raw = realloc(line_raw, size); The memory pointed by line_raw is lost.
Loading
Please register or sign in to comment