On Mon, Mar 10, 2014 at 03:31:48PM +0800, Chunyan Liu wrote:
> @@ -1622,11 +1622,11 @@ out:
> return ret;
> }
>
> -static int qcow2_create(const char *filename, QEMUOptionParameter *options,
> - Error **errp)
> +static int qcow2_create(const char *filename, QemuOpts *opts, Error **errp)
> {
> - const char *backing_file = NULL;
> - const char *backing_fmt = NULL;
> + char *backing_file = NULL;
> + char *backing_fmt = NULL;
> + char *buf;
It wouldn't hurt to initialize buf to NULL. That way there is no chance
of introducing a bug by jumping to the error path before buf has been
initialized.
Stefan