Pan Nengyuan <[email protected]> 于2020年8月14日周五 下午6:37写道: > > Missing g_error_free() in sev_read_file_base64() error path. > Fix that. > > Reported-by: Euler Robot <[email protected]> > Signed-off-by: Pan Nengyuan <[email protected]>
Reviewed-by: Li Qiang <[email protected]> > --- > Cc: Paolo Bonzini <[email protected]> > Cc: Richard Henderson <[email protected]> > Cc: Eduardo Habkost <[email protected]> > --- > target/i386/sev.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/target/i386/sev.c b/target/i386/sev.c > index c3ecf86704..de4818da6d 100644 > --- a/target/i386/sev.c > +++ b/target/i386/sev.c > @@ -500,6 +500,7 @@ sev_read_file_base64(const char *filename, guchar **data, > gsize *len) > > if (!g_file_get_contents(filename, &base64, &sz, &error)) { > error_report("failed to read '%s' (%s)", filename, error->message); > + g_error_free(error); > return -1; > } > > -- > 2.18.2 > >
