hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/of/overlay.c
....@@ -547,7 +547,7 @@
547547
548548 fn_1 = kasprintf(GFP_KERNEL, "%pOF", ce_1->np);
549549 fn_2 = kasprintf(GFP_KERNEL, "%pOF", ce_2->np);
550
- node_path_match = !strcmp(fn_1, fn_2);
550
+ node_path_match = !fn_1 || !fn_2 || !strcmp(fn_1, fn_2);
551551 kfree(fn_1);
552552 kfree(fn_2);
553553 if (node_path_match) {
....@@ -582,7 +582,7 @@
582582
583583 fn_1 = kasprintf(GFP_KERNEL, "%pOF", ce_1->np);
584584 fn_2 = kasprintf(GFP_KERNEL, "%pOF", ce_2->np);
585
- node_path_match = !strcmp(fn_1, fn_2);
585
+ node_path_match = !fn_1 || !fn_2 || !strcmp(fn_1, fn_2);
586586 kfree(fn_1);
587587 kfree(fn_2);
588588 if (node_path_match &&