From: phk Date: Wed, 23 Jan 2008 10:05:45 +0000 (+0000) Subject: Make sure to always NULL the pointer argument to cli_readres(). X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4140788c5dfc9c7f66a4f48daffc2f9eaae4b67;p=varnish Make sure to always NULL the pointer argument to cli_readres(). Implicated in Coverity Scan (CID:12-16) git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2371 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/lib/libvarnish/cli_common.c b/varnish-cache/lib/libvarnish/cli_common.c index 69922fcb..69fa3702 100644 --- a/varnish-cache/lib/libvarnish/cli_common.c +++ b/varnish-cache/lib/libvarnish/cli_common.c @@ -143,6 +143,8 @@ cli_readres(int fd, unsigned *status, char **ptr, double tmo) unsigned u, v; char *p; + if (ptr != NULL) + *ptr = NULL; i = read_tmo(fd, res, CLI_LINE0_LEN, tmo); if (i != CLI_LINE0_LEN) { if (status != NULL)