From 3268ae4c888e2dfac517ce5aac2aeb8004d1f370 Mon Sep 17 00:00:00 2001 From: Peter Lieven Date: Sat, 3 Nov 2012 02:26:30 +0100 Subject: [PATCH] INIT fix iscsi_destroy_url --- include/iscsi.h | 2 ++ lib/init.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/iscsi.h b/include/iscsi.h index af7e1ba..9753d22 100644 --- a/include/iscsi.h +++ b/include/iscsi.h @@ -33,6 +33,7 @@ struct iscsi_context; struct sockaddr; #define MAX_STRING_SIZE (255) +#define PAGE_SIZE (4096) /* * Syntax for normal and portal/discovery URLs. @@ -533,6 +534,7 @@ iscsi_task_mgmt_target_cold_reset_async(struct iscsi_context *iscsi, struct iscsi_data { int size; + int alloc_size; unsigned char *data; }; diff --git a/lib/init.c b/lib/init.c index c23d25d..840e163 100644 --- a/lib/init.c +++ b/lib/init.c @@ -469,7 +469,7 @@ iscsi_destroy_url(struct iscsi_url *iscsi_url) struct iscsi_context *iscsi = iscsi_url->iscsi; memset(iscsi_url, 0, sizeof(struct iscsi_url)); if (iscsi != NULL) - iscsi_free(iscsi_url->iscsi, iscsi_url); + iscsi_free(iscsi, iscsi_url); else free(iscsi_url); }