summaryrefslogtreecommitdiff
path: root/src/string_functions.c
diff options
context:
space:
mode:
authorJakub Sławiński2005-11-16 20:53:54 +0100
committerJoshua Judson Rosen2014-07-17 21:15:00 +0200
commite1c93eb660b5e628c0d3c2bbdaf82dc24c07da84 (patch)
tree6e53f7909e980171ec1951c370929234eda07a9a /src/string_functions.c
parentv0.7.4 (diff)
downloadapf-e1c93eb660b5e628c0d3c2bbdaf82dc24c07da84.tar.gz
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
Diffstat (limited to 'src/string_functions.c')
-rw-r--r--src/string_functions.c4
1 files changed, 4 insertions, 0 deletions
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;
}