Revision 2e1103f6

b/qom/object.c
1113 1113
Object *object_resolve_path_type(const char *path, const char *typename,
1114 1114
                                 bool *ambiguous)
1115 1115
{
1116
    bool partial_path = true;
1117 1116
    Object *obj;
1118 1117
    gchar **parts;
1119 1118

  
1120 1119
    parts = g_strsplit(path, "/", 0);
1121
    if (parts == NULL || parts[0] == NULL) {
1122
        g_strfreev(parts);
1123
        return object_get_root();
1124
    }
1125

  
1126
    if (strcmp(parts[0], "") == 0) {
1127
        partial_path = false;
1128
    }
1120
    assert(parts);
1129 1121

  
1130
    if (partial_path) {
1122
    if (parts[0] == NULL || strcmp(parts[0], "") != 0) {
1131 1123
        if (ambiguous) {
1132 1124
            *ambiguous = false;
1133 1125
        }

Also available in: Unified diff