From df877c8e0d8901cdaf4c41df126b8285566dc8db Mon Sep 17 00:00:00 2001 From: erickson Date: Mon, 7 May 2007 14:07:36 +0000 Subject: [PATCH] added size check to constructor git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@874 9efc2488-bf62-4759-914b-345cdb29e865 --- src/libstack/osrf_list.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libstack/osrf_list.c b/src/libstack/osrf_list.c index 261e850..0054c79 100644 --- a/src/libstack/osrf_list.c +++ b/src/libstack/osrf_list.c @@ -11,6 +11,7 @@ osrfList* osrfNewList() { osrfList* osrfNewListSize( unsigned int size ) { osrfList* list; OSRF_MALLOC(list, sizeof(osrfList)); + if( size <= 0 ) size = 16; list->arrsize = size; OSRF_MALLOC( list->arrlist, list->arrsize * sizeof(void*) ); return list; -- 2.11.0