]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - client_common.c
client: Remove the buffer tree node on errors.
[paraslash.git] / client_common.c
index bd5a7bfba0cbce4dfeb9ac75ef5a523f5c6d6e5c..934758dd8f8e5ed03ff2493fe18e0cd533fde977 100644 (file)
@@ -178,7 +178,7 @@ static void client_post_select(struct sched *s, struct task *t)
                ret = client_recv_buffer(ct, buf, sizeof(buf));
                if (ret < 0)
                        goto err;
-               PARA_INFO_LOG("<-- [challenge] (%zu bytes)\n", ret);
+               PARA_INFO_LOG("<-- [challenge] (%d bytes)\n", ret);
                ret = para_decrypt_buffer(ct->key_file, crypt_buf,
                        (unsigned char *)buf, ret);
                if (ret < 0)
@@ -404,6 +404,7 @@ out:
        free(home);
        if (ret < 0) {
                PARA_ERROR_LOG("%s\n", para_strerror(-ret));
+               btr_remove_node(ct->btrn);
                btr_free_node(ct->btrn);
                client_close(ct);
                *ct_ptr = NULL;