CHANGE check edit-config target parameter
diff --git a/src/netopeerguid.c b/src/netopeerguid.c
index 54c2d1c..dc0ea67 100644
--- a/src/netopeerguid.c
+++ b/src/netopeerguid.c
@@ -2500,9 +2500,11 @@
     testopt = get_param_string(request, "test-option");
     pthread_mutex_unlock(&json_lock);
 
-    if (target != NULL) {
-        ds_type_t = parse_datastore(target);
+    if (!target) {
+        ERROR("Missing the target parameter.");
+        goto finalize;
     }
+    ds_type_t = parse_datastore(target);
 
     if (defop != NULL) {
         if (strcmp(defop, "merge") == 0) {