shithub: scc

Download patch

ref: 71bd895b5dcedc3e24e2a0b5710b1ba01a955cfc
parent: 330cfd2833ed695dac4462c0035925e2187d17fe
author: Roberto E. Vargas Caballero <[email protected]>
date: Fri Feb 8 02:49:33 EST 2019

[libmach] Remove duplicated  delsyms()

--- a/src/libmach/objstrip.c
+++ b/src/libmach/objstrip.c
@@ -6,22 +6,6 @@
 
 extern stripfun_t stripv[];
 
-/* TODO: It is better to move this to a common place */
-static void
-delsyms(Obj *obj)
-{
-	Symbol *sym, *next;
-
-	for (sym = obj->head; sym; sym = next) {
-		next = sym->next;
-		free(sym->name);
-		free(sym);
-	}
-
-	obj->head = NULL;
-	memset(obj->htab, 0, sizeof(obj->htab));
-}
-
 int
 objstrip(Obj *obj)
 {
@@ -33,6 +17,6 @@
 		return -1;
 	fn = stripv[fmt];
 	(*fn)(obj);
-	delsyms(obj);
+	objfree(obj, FREESYM);
 	return 0;
 }