equal
deleted
inserted
replaced
18 * information: Portions Copyright [yyyy] [name of copyright owner] |
18 * information: Portions Copyright [yyyy] [name of copyright owner] |
19 * |
19 * |
20 * CDDL HEADER END |
20 * CDDL HEADER END |
21 */ |
21 */ |
22 /* |
22 /* |
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved. |
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved. |
24 * Use is subject to license terms. |
24 * Use is subject to license terms. |
25 */ |
25 */ |
26 |
26 |
27 #pragma ident "%Z%%M% %I% %E% SMI" |
27 #pragma ident "%Z%%M% %I% %E% SMI" |
28 |
28 |
101 inet_minor_free(void *a, dev_t dev) |
101 inet_minor_free(void *a, dev_t dev) |
102 { |
102 { |
103 ASSERT((dev != OPENFAIL) && (dev != 0) && (dev <= inet_maxminor)); |
103 ASSERT((dev != OPENFAIL) && (dev != 0) && (dev <= inet_maxminor)); |
104 vmem_free(((inet_arena_t *)a)->ineta_arena, (void *)dev, 1); |
104 vmem_free(((inet_arena_t *)a)->ineta_arena, (void *)dev, 1); |
105 } |
105 } |
|
106 |
|
107 /* |
|
108 * This function is used to free a message that has gone through |
|
109 * mi_copyin processing which modifies the M_IOCTL mblk's b_next |
|
110 * and b_prev pointers. We use this function to set b_next/b_prev |
|
111 * to NULL and free them. |
|
112 */ |
|
113 void |
|
114 inet_freemsg(mblk_t *mp) |
|
115 { |
|
116 mblk_t *bp = mp; |
|
117 |
|
118 for (; bp != NULL; bp = bp->b_cont) { |
|
119 bp->b_prev = NULL; |
|
120 bp->b_next = NULL; |
|
121 } |
|
122 freemsg(mp); |
|
123 } |