Commit 852e402
committed
Fix: libcib: Full-CIB replace op no longer segfaults with cib_xpath
Previously, a CIB replace operation targeting the full CIB would fail
with a segmentation fault if the cib_xpath flag were set (or if --xpath
were used with cibadmin). Presumably this is because
process_replace_xpath() was freeing the CIB, leaving no reference to it,
and possibly dereferencing more nodes in the document as it continued
processing any remaining XPath search results.
Now, a full CIB replacement with XPath succeeds if the replacement CIB
is well-formed and is of a newer version, and it appears to fail sanely
otherwise.
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>1 parent f4e20d3 commit 852e402
1 file changed
+8
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
828 | 828 | | |
829 | 829 | | |
830 | 830 | | |
831 | | - | |
| 831 | + | |
832 | 832 | | |
833 | 833 | | |
834 | 834 | | |
835 | | - | |
| 835 | + | |
836 | 836 | | |
837 | 837 | | |
838 | 838 | | |
| |||
855 | 855 | | |
856 | 856 | | |
857 | 857 | | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
858 | 863 | | |
859 | 864 | | |
860 | 865 | | |
| |||
912 | 917 | | |
913 | 918 | | |
914 | 919 | | |
915 | | - | |
| 920 | + | |
916 | 921 | | |
917 | 922 | | |
918 | 923 | | |
| |||
0 commit comments