Re: [Qemu-devel] [PATCH 3/6] fw_cfg: assertion to detect memory leak when adding new data blob

2015-03-16 Thread Laszlo Ersek
On 03/16/15 15:15, Gabriel L. Somlo wrote: > Currently, fw_cfg_add_bytes_read_callback() does not deal with > the possibility that the data pointer at the requested key position > has previously been set, and assumes it will be called exactly once > for each key value. > > This patch introduces an

[Qemu-devel] [PATCH 3/6] fw_cfg: assertion to detect memory leak when adding new data blob

2015-03-16 Thread Gabriel L. Somlo
Currently, fw_cfg_add_bytes_read_callback() does not deal with the possibility that the data pointer at the requested key position has previously been set, and assumes it will be called exactly once for each key value. This patch introduces an assertion to codify this assumption, and insure the da