From: Sascha Wildner Date: Fri, 30 Dec 2011 16:13:32 +0000 (+0100) Subject: kernel/altq: Move a dereference below the NULL check. X-Git-Tag: v3.0.0~231 X-Git-Url: http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/b621ed1c691562d48ecd9a583a53c5f6cd4b6a92 kernel/altq: Move a dereference below the NULL check. --- diff --git a/sys/net/altq/altq_hfsc.c b/sys/net/altq/altq_hfsc.c index ef0b475..9b34a96 100644 --- a/sys/net/altq/altq_hfsc.c +++ b/sys/net/altq/altq_hfsc.c @@ -1,5 +1,4 @@ /* $KAME: altq_hfsc.c,v 1.25 2004/04/17 10:54:48 kjc Exp $ */ -/* $DragonFly: src/sys/net/altq/altq_hfsc.c,v 1.9 2008/05/14 11:59:23 sephe Exp $ */ /* * Copyright (c) 1997-1999 Carnegie Mellon University. All Rights Reserved. @@ -540,11 +539,12 @@ hfsc_class_create(struct hfsc_if *hif, struct service_curve *rsc, static int hfsc_class_destroy(struct hfsc_class *cl) { - struct hfsc_if *hif = cl->cl_hif; + struct hfsc_if *hif; int i; if (cl == NULL) return (0); + hif = cl->cl_hif; if (is_a_parent_class(cl)) return (EBUSY);