Merge tag 'net-6.1-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
[sfrench/cifs-2.6.git] / drivers / net / ethernet / cavium / thunder / thunder_bgx.c
index 2f6484dc186ab14fe0b47e0bd6d01b03e6b56dbf..7eb2ddbe9bad6b3f5586704be0a0ff8474346c20 100644 (file)
@@ -1436,8 +1436,10 @@ static acpi_status bgx_acpi_match_id(acpi_handle handle, u32 lvl,
                return AE_OK;
        }
 
-       if (strncmp(string.pointer, bgx_sel, 4))
+       if (strncmp(string.pointer, bgx_sel, 4)) {
+               kfree(string.pointer);
                return AE_OK;
+       }
 
        acpi_walk_namespace(ACPI_TYPE_DEVICE, handle, 1,
                            bgx_acpi_register_phy, NULL, bgx, NULL);