This commit is contained in:
Olof Hagsand 2016-12-10 14:57:36 +01:00
parent f4e0b4bf20
commit 8d21c7256a

View file

@ -582,6 +582,10 @@ xml_diff1(yang_stmt *ys,
for other x2 */ for other x2 */
break; break;
} }
if (cvk){
cvec_free(cvk);
cvk = NULL;
}
if (equal){ if (equal){
if (xml_diff1(y, x1, x2, if (xml_diff1(y, x1, x2,
first, firstlen, first, firstlen,
@ -593,10 +597,7 @@ xml_diff1(yang_stmt *ys,
else else
if (cxvec_append(x1, first, firstlen) < 0) if (cxvec_append(x1, first, firstlen) < 0)
goto done; goto done;
if (cvk){
cvec_free(cvk);
cvk = NULL;
}
break; break;
case Y_CONTAINER: case Y_CONTAINER:
/* Equal regardless */ /* Equal regardless */
@ -686,13 +687,13 @@ xml_diff1(yang_stmt *ys,
for other x2 */ for other x2 */
break; break;
} }
if (!equal)
if (cxvec_append(x2, second, secondlen) < 0)
goto done;
if (cvk){ if (cvk){
cvec_free(cvk); cvec_free(cvk);
cvk = NULL; cvk = NULL;
} }
if (!equal)
if (cxvec_append(x2, second, secondlen) < 0)
goto done;
break; break;
case Y_CONTAINER: case Y_CONTAINER:
/* Equal regardless */ /* Equal regardless */