BUGFIX: deference of NULL pointer during get notif. hist.
diff --git a/src/mod_netconf.c b/src/mod_netconf.c
index 2abc8b0..38ac63e 100644
--- a/src/mod_netconf.c
+++ b/src/mod_netconf.c
@@ -539,8 +539,8 @@
 			/* there is error handled by callback */
 			if (data != NULL) {
 				free(*data);
+				(*data) = NULL;
 			}
-			(*data) = NULL;
 			return NULL;
 		case NC_MSG_REPLY:
 			switch (replyt = nc_reply_get_type(reply)) {