Skip to content

Commit

Permalink
operate: avoid NULL dereference
Browse files Browse the repository at this point in the history
Coverity CID 1241948. dumpeasysrc() would get called with
config->current set to NULL which could be dereferenced by a warnf()
call.
  • Loading branch information
bagder committed Oct 8, 2014
1 parent 87c8e00 commit eb1e3a3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/tool_operate.c
Expand Up @@ -1848,6 +1848,9 @@ CURLcode operate(struct GlobalConfig *config, int argc, argv_item_t argv[])
/* Cleanup the libcurl source output */
easysrc_cleanup();

/* set current back to first so that isn't NULL */
config->current = config->first;

/* Dump the libcurl code if previously enabled */
dumpeasysrc(config);
#endif
Expand Down

0 comments on commit eb1e3a3

Please sign in to comment.