From e1c93eb660b5e628c0d3c2bbdaf82dc24c07da84 Mon Sep 17 00:00:00 2001 From: Jakub Sławiński Date: Wed, 16 Nov 2005 20:53:54 +0100 Subject: v0.7.5 - Fixed: manageport option in the afclient config file - Fixed: severe bug in string_cp - Fixed: wrong connection type used by afclient when afserver used --nossl or --nozlib option - Fixed: broken keep-alive option --- src/string_functions.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/string_functions.c') diff --git a/src/string_functions.c b/src/string_functions.c index 471d3eb..58ee17e 100644 --- a/src/string_functions.c +++ b/src/string_functions.c @@ -45,6 +45,10 @@ string_cp(char** dest, char* src) /* 1. releasing memory allocated by *dest */ if (dest != NULL) { if ((*dest) != NULL) { + /* if *dest points to the same memory as src - we shouldn't do anything */ + if ((*dest) == src) { + return (*dest); + } free((*dest)); (*dest) = NULL; } -- cgit v1.1