From a4140788c5dfc9c7f66a4f48daffc2f9eaae4b67 Mon Sep 17 00:00:00 2001 From: phk Date: Wed, 23 Jan 2008 10:05:45 +0000 Subject: [PATCH] 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 --- varnish-cache/lib/libvarnish/cli_common.c | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.39.5