CHROMIUM: broadband-modem-qmi: Fix crash on array free

Freeing the values of the array is not correct and causes a crash when
modemmanager is stopped. Cleanup the logic related to the creation and
disposing of the array.

BUG=b:189112803
TEST=restart modemmanager and check for crashes.
TEST=Run `tast run lazor network.ModemmanagerInhibitDevice` with and
without this fix, and see no crashes with the fix.

Change-Id: I587fdba9bebd6a4b5abf6c2ca0038bdc930d8556
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/modemmanager-next/+/2919179
Tested-by: Andrew Lassalle <andrewlassalle@chromium.org>
Commit-Queue: Andrew Lassalle <andrewlassalle@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Pavan Holla <pholla@google.com>
(cherry picked from commit 7efa220ad0a003b05613e3e75d8e2d79570b26dd)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/modemmanager-next/+/2926139
Auto-Submit: Andrew Lassalle <andrewlassalle@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
1 file changed