]> err.no Git - varnish/commitdiff
Make sure to always NULL the pointer argument to cli_readres().
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 23 Jan 2008 10:05:45 +0000 (10:05 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 23 Jan 2008 10:05:45 +0000 (10:05 +0000)
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

index 69922fcbdae89be6c5696cb1e4066ffd3f90a85d..69fa3702f0375680853c3f1d1500b09472ab0029 100644 (file)
@@ -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)