src/server/plugins/postgresql/pgtest.c

changeset 403
0f678595d497
parent 374
77506ec632a4
child 415
d938228c382e
--- a/src/server/plugins/postgresql/pgtest.c	Tue Nov 01 15:59:28 2022 +0100
+++ b/src/server/plugins/postgresql/pgtest.c	Tue Nov 01 16:40:03 2022 +0100
@@ -173,9 +173,11 @@
                         if(value && value->type == XML_TEXT_NODE) {
                             property->value = sstrdup_a(a, scstr((const char*)value->content)).ptr;
                         }
-                        sstr_t pname = sstrcat(2, sstr(property->namespace), sstr(property->name));
-                        ucx_map_sstr_put(properties, pname, property);
-                        free(pname.ptr);
+                        if(property->namespace && property->name) {
+                            sstr_t pname = sstrcat(2, sstr(property->namespace), sstr(property->name));
+                            ucx_map_sstr_put(properties, pname, property);
+                            free(pname.ptr);
+                        }
                     }
                     n = n->next;
                 }

mercurial