X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;f=daemon%2Ffnet-dc.c;h=198672f6631478f19250076dc3f791490f1f1421;hb=1315d02ac996285e943de172ccd6c420633eeeec;hp=772306cf4dfd26c931c20b4d827eef036006ffdf;hpb=c7185019854aa79630ff944e191f59582c675d8b;p=doldaconnect.git diff --git a/daemon/fnet-dc.c b/daemon/fnet-dc.c index 772306c..198672f 100644 --- a/daemon/fnet-dc.c +++ b/daemon/fnet-dc.c @@ -1167,10 +1167,11 @@ static void cmd_search(struct socket *sk, struct fnetnode *fn, char *cmd, char * if(!dotth && !strncmp(p, "TTH:", 4)) { dotth = 1; - if((buf = base32decode(p + 4, &buflen)) == NULL) - goto out; - if(buflen != 24) + if(((buf = base32decode(p + 4, &buflen)) == NULL) || (buflen != 24)) + { + free(buf); goto out; + } memcpy(hashtth, buf, 24); free(buf); } else {