diff --git a/libdispatch/ddispatch.c b/libdispatch/ddispatch.c index 525a88e28..c8082129c 100644 --- a/libdispatch/ddispatch.c +++ b/libdispatch/ddispatch.c @@ -90,6 +90,7 @@ NC_findtestserver(const char* path, const char** servers) if(stat == NC_NOERR) return url; } + if(url) free(url); #endif #endif return NULL; @@ -121,7 +122,7 @@ NC_testurl(const char* path) if(strcmp(tmpurl->protocol,protolist->protocol) == 0) { isurl=1; break; - } + } } ncurifree(tmpurl); return isurl; @@ -163,10 +164,10 @@ NC_urlmodel(const char* path) free(tmpurl->protocol); tmpurl->protocol = strdup(protolist->substitute); } - break; + break; } } - } + } /* Force NC_DISPATCH_NC3 if necessary */ if((model & NC_DISPATCH_NC4) == 0)