diff options
author | David Hankins <dhankins@isc.org> | 2004-11-24 17:39:19 +0000 |
---|---|---|
committer | David Hankins <dhankins@isc.org> | 2004-11-24 17:39:19 +0000 |
commit | 7c4c929f24e5ce08b0e59be8dc35a009e54a4055 (patch) | |
tree | 5720cfce8153ba3f8f7ce0011d7dd74b1734b792 /omapip/alloc.c | |
parent | d2af93e396914e68b4f7bb105ebeb5c881dc01dd (diff) | |
download | isc-dhcp-7c4c929f24e5ce08b0e59be8dc35a009e54a4055.tar.gz |
- Merge in RT13103.
Diffstat (limited to 'omapip/alloc.c')
-rw-r--r-- | omapip/alloc.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/omapip/alloc.c b/omapip/alloc.c index 01db1e88..289ebbf5 100644 --- a/omapip/alloc.c +++ b/omapip/alloc.c @@ -512,8 +512,11 @@ isc_result_t omapi_object_allocate (omapi_object_t **o, foo = (omapi_object_t *)0; status = (*type -> allocator) (&foo, file, line); tsize = type -> size; - } else + } else { status = ISC_R_NOMEMORY; + tsize = 0; + } + if (status == ISC_R_NOMEMORY) { if (type -> sizer) tsize = (*type -> sizer) (size); @@ -784,11 +787,11 @@ isc_result_t omapi_typed_data_new (const char *file, int line, va_list l; omapi_typed_data_t *new; unsigned len; - unsigned val; - int intval; - char *s; + unsigned val = 0; + int intval = 0; + char *s = NULL; isc_result_t status; - omapi_object_t *obj; + omapi_object_t *obj = NULL; va_start (l, type); |