--- embedaddon/dhcp/omapip/protocol.c 2012/02/21 22:30:18 1.1 +++ embedaddon/dhcp/omapip/protocol.c 2012/10/09 09:06:54 1.1.1.1 @@ -3,7 +3,8 @@ Functions supporting the object management protocol... */ /* - * Copyright (c) 2004-2007,2009 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 2009,2012 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 2004-2007 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1999-2003 by Internet Software Consortium * * Permission to use, copy, modify, and distribute this software for any @@ -926,12 +927,10 @@ isc_result_t omapi_protocol_destroy (omapi_object_t *h dfree (p -> default_auth, file, line); while (p -> remote_auth_list) { - omapi_remote_auth_t *r = p -> remote_auth_list -> next; - p -> remote_auth_list = r; - if (r) { - omapi_object_dereference (&r -> a, file, line); - dfree (r, file, line); - } + omapi_remote_auth_t *r = p -> remote_auth_list; + p -> remote_auth_list = p -> remote_auth_list -> next; + omapi_object_dereference (&r -> a, file, line); + dfree (r, file, line); } return ISC_R_SUCCESS; }