]> git.proxmox.com Git - mirror_qemu.git/commitdiff
slirp: Fix memory leak on small incoming ipv4 packet
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 20 Mar 2016 11:14:18 +0000 (12:14 +0100)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 22 Mar 2016 21:51:56 +0000 (22:51 +0100)
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
slirp/ip_input.c

index 12f173de6cf4025c605941911802116067be087e..b464f6baf0a3946ebf52c1d97af4c56857e42b47 100644 (file)
@@ -85,7 +85,7 @@ ip_input(struct mbuf *m)
        DEBUG_ARG("m_len = %d", m->m_len);
 
        if (m->m_len < sizeof (struct ip)) {
-               return;
+               goto bad;
        }
 
        ip = mtod(m, struct ip *);