From: Ken Raeburn Date: Wed, 6 Aug 2008 16:43:44 +0000 (+0000) Subject: Fully initialize handle data on allocation X-Git-Tag: krb5-1.7-alpha1~527 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5ad72747b589b66462ea71203ffe7a7a93b1e7d2;p=krb5.git Fully initialize handle data on allocation git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20617 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/kadm5/clnt/client_init.c b/src/lib/kadm5/clnt/client_init.c index 67a99e7fd..fc67ab2d7 100644 --- a/src/lib/kadm5/clnt/client_init.c +++ b/src/lib/kadm5/clnt/client_init.c @@ -189,6 +189,7 @@ static kadm5_ret_t _kadm5_init_any(char *client_name, if (! (handle = malloc(sizeof(*handle)))) { return ENOMEM; } + memset(handle, 0, sizeof(*handle)); if (! (handle->lhandle = malloc(sizeof(*handle)))) { free(handle); return ENOMEM; @@ -200,6 +201,7 @@ static kadm5_ret_t _kadm5_init_any(char *client_name, handle->clnt = 0; handle->cache_name = 0; handle->destroy_cache = 0; + handle->context = 0; *handle->lhandle = *handle; handle->lhandle->api_version = KADM5_API_VERSION_2; handle->lhandle->struct_version = KADM5_STRUCT_VERSION;