Eduardo Habkost ebcc479eee qom: Fix ambiguous path detection when ambiguous=NULL
object_resolve_path*() ambiguous path detection breaks when
ambiguous==NULL and the object tree have 3 objects of the same type and
only 2 of them are under the same parent.  e.g.:

 /container/obj1 (TYPE_FOO)
 /container/obj2 (TYPE_FOO)
 /obj2 (TYPE_FOO)

With the above tree, object_resolve_path_type("", TYPE_FOO, NULL) will
incorrectly return /obj2, because the search inside "/container" will
return NULL, and the match at "/obj2" won't be detected as ambiguous.

Fix that by always calling object_resolve_partial_path() with a non-NULL
ambiguous parameter.

Test case included.

Reported-by: Igor Mammedov <imammedo@redhat.com>
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20170707213052.13087-3-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2017-07-17 15:41:30 -03:00
..
2017-07-11 17:45:00 +02:00
2017-06-20 14:31:31 +02:00
2016-10-26 08:29:01 -07:00
2017-05-18 10:01:08 +01:00
2017-06-20 14:31:31 +02:00
2017-03-01 11:51:28 +04:00
2017-03-01 11:51:28 +04:00
2017-03-01 11:51:05 +04:00
2017-03-01 11:51:04 +04:00
2017-03-01 11:51:28 +04:00
2017-06-04 18:42:55 +03:00
2017-03-01 11:51:05 +04:00
2017-03-01 11:51:05 +04:00
2017-05-30 16:09:48 -03:00
2017-03-01 00:09:28 +04:00
2017-03-01 00:09:28 +04:00
2017-03-01 00:09:28 +04:00
2017-06-06 20:18:35 +02:00
2017-03-01 11:51:25 +04:00
2017-01-10 08:49:59 -08:00
2017-07-14 11:04:34 +02:00
2017-07-11 17:44:57 +02:00
2017-03-07 16:07:47 +01:00
2016-11-11 20:53:23 +08:00
2017-03-01 11:51:29 +04:00