libqos/ahci: fix memory management bugs
commit95ea663693fdf4f39976f9aadb004fc77c2058ee
authorJohn Snow <jsnow@redhat.com>
Sat, 4 Jul 2015 06:06:02 +0000 (4 02:06 -0400)
committerJohn Snow <jsnow@redhat.com>
Sat, 4 Jul 2015 06:06:02 +0000 (4 02:06 -0400)
tree25bcac6bbdecbcbce2e00429e66442e645b9d765
parent0d3e9d1f598e803a02c9bf43ec0b053e873ca79a
libqos/ahci: fix memory management bugs

There's a handful of trivial bugs in the libqos/ahci functions,
squish them together.

- Zero cached pointers after freeing them
- The Command List Buffer is an array of 32x 32 byte structures, not
  32x 8 byte pointers -- it's 1MiB, not 256 bytes. Zero it ALL.
- Free the correct command in ahci_pick_cmd.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 1434470575-21625-4-git-send-email-jsnow@redhat.com
tests/libqos/ahci.c