-/* $OpenBSD: application_internal.c,v 1.8 2023/11/12 16:03:41 martijn Exp $ */
+/* $OpenBSD: application_internal.c,v 1.9 2023/12/12 20:15:49 martijn Exp $ */
/*
* Copyright (c) 2023 Martijn van Duren <martijn@openbsd.org>
oid.bo_id[oid.bo_n++] = 0;
if (appl_register(NULL, 150, 1, &oid,
1, 1, 0, 0, &appl_config) != APPL_ERROR_NOERROR) {
- if (obj->stringval != NULL)
- free(obj->stringval);
+ free(obj->stringval);
free(obj);
} else
RB_INSERT(appl_internal_objects, &appl_internal_objects,
while ((object = RB_ROOT(&appl_internal_objects)) != NULL) {
RB_REMOVE(appl_internal_objects, &appl_internal_objects,
object);
+ free(object->stringval);
free(object);
}
appl_close(&appl_internal);
+ appl_close(&appl_config);
}
void
obj->oid = *oid;
obj->get = get;
obj->getnext = getnext;
+ obj->stringval = NULL;
RB_INSERT(appl_internal_objects, &appl_internal_objects, obj);
}