(cache_set): Free victim if newbuf allocation fails.
authordrepper <drepper>
Fri, 7 Apr 2006 02:18:55 +0000 (02:18 +0000)
committerdrepper <drepper>
Fri, 7 Apr 2006 02:18:55 +0000 (02:18 +0000)
sunrpc/svc_udp.c

index d10aa50..67b84f1 100644 (file)
@@ -548,6 +548,7 @@ cache_set (SVCXPRT *xprt, u_long replylen)
       newbuf = mem_alloc (su->su_iosz);
       if (newbuf == NULL)
        {
+         mem_free (victim, sizeof (struct cache_node));
          CACHE_PERROR (_("cache_set: could not allocate new rpc_buffer"));
          return;
        }