diff options
Diffstat (limited to 'source3/lib/wins_srv.c')
-rw-r--r-- | source3/lib/wins_srv.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source3/lib/wins_srv.c b/source3/lib/wins_srv.c index e6c0c51608..5a9b065008 100644 --- a/source3/lib/wins_srv.c +++ b/source3/lib/wins_srv.c @@ -131,9 +131,8 @@ BOOL wins_srv_load_list( char *src ) /* Empty the list. */ while( NULL != (entry =(list_entry *)ubi_slRemHead( wins_srv_list )) ) { - if( entry->server ) - free( entry->server ); - free( entry ); + SAFE_FREE( entry->server ); + SAFE_FREE( entry ); } (void)ubi_slInitList( wins_srv_list ); /* shouldn't be needed */ @@ -152,7 +151,7 @@ BOOL wins_srv_load_list( char *src ) /* Create a copy of the server name and store it in the list. */ if( NULL == (entry->server = strdup( wins_id_bufr )) ) { - free( entry ); + SAFE_FREE( entry ); DEBUG( 0, ("wins_srv_load_list(): strdup(\"%s\") failed.\n", wins_id_bufr) ); } |