Date: Sat, 2 Jun 2007 21:49:40 GMT From: Fredrik Lindberg <fli@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 120802 for review Message-ID: <200706022149.l52LneTc067072@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=120802 Change 120802 by fli@fli_genesis on 2007/06/02 21:48:49 - Remove incorrect assertion. - Check return value from mdns_buf_alloc() Affected files ... .. //depot/projects/soc2007/fli-mdns_sd/mdnsd/stack_buf.c#6 edit Differences ... ==== //depot/projects/soc2007/fli-mdns_sd/mdnsd/stack_buf.c#6 (text+ko) ==== @@ -233,7 +233,6 @@ struct mdns_bufhead bh2; MDNS_INIT_ASSERT(bp, bp_magic); - MDNS_INIT_ASSERT(buf, b_magic); if (MDNS_BUFHSZ(bh) <= 1) return (TAILQ_FIRST(&bh->bh_list)); @@ -248,6 +247,8 @@ bzero(&bh2, sizeof(struct mdns_bufhead)); buf = mdns_buf_alloc(bp, &bh2, len, 1); + if (buf == NULL) + return (NULL); while (!TAILQ_EMPTY(&bh->bh_list)) { buf2 = TAILQ_FIRST(&bh->bh_list);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706022149.l52LneTc067072>