Revision 48e5f32d lib/resource.c

View differences:

lib/resource.c
157 157
{
158 158
  resource *r = res;
159 159

  
160
  if (r)
161
    {
162
      if (r->n.next)
163
	rem_node(&r->n);
164
      r->class->free(r);
165
      xfree(r);
166
    }
160
  if (!r)
161
    return;
162

  
163
  if (r->n.next)
164
    rem_node(&r->n);
165
  r->class->free(r);
166
  xfree(r);
167 167
}
168 168

  
169 169
/**
......
408 408
void
409 409
mb_free(void *m)
410 410
{
411
  if (!m)
412
    return;
413

  
411 414
  struct mblock *b = SKIP_BACK(struct mblock, data, m);
412 415
  rfree(b);
413 416
}

Also available in: Unified diff