scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

coff32del.c (287B)


      1 #include <stdio.h>
      2 #include <stdlib.h>
      3 
      4 #include <scc/mach.h>
      5 
      6 #include "../libmach.h"
      7 #include "coff32.h"
      8 
      9 void
     10 coff32del(Obj *obj)
     11 {
     12 	struct coff32 *coff = obj->data;
     13 
     14 	if (coff) {
     15 		free(coff->scns);
     16 		free(coff->ents);
     17 		free(coff->strtbl);
     18 	}
     19 	free(obj->data);
     20 	obj->data = NULL;
     21 }