Host is static memory, don't free.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21131 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -501,10 +501,8 @@ add_locate(void *ctx, int type, struct sockaddr *addr)
|
||||
hostlen = strlen(host);
|
||||
|
||||
hi = calloc(1, sizeof(*hi) + hostlen);
|
||||
if(hi == NULL) {
|
||||
free(host);
|
||||
if(hi == NULL)
|
||||
return ENOMEM;
|
||||
}
|
||||
|
||||
hi->proto = krbhst_get_default_proto(kd);
|
||||
hi->port = hi->def_port = socket_get_port(addr);
|
||||
|
Reference in New Issue
Block a user