Messages in this thread | | | Date | Fri, 25 Jan 2013 11:00:37 +0800 | From | Xiao Guangrong <> | Subject | Re: [PATCH 23/74] perf kvm: Initialize file_name var to fix segfault |
| |
On 01/25/2013 04:07 AM, Arnaldo Carvalho de Melo wrote: > From: Arnaldo Carvalho de Melo <acme@redhat.com> > > The 3786063 commit: > > perf kvm: Rename perf_kvm to perf_kvm_stat > > Moved the file_name from inside a local struct var that initialized some > of its members, thus zero initializing the not explicitely initialized > variables, one of which was 'file_name', to a standalone local variable, > but forgot to initialize it explicitely to NULL, so it then got some > undefined value, causing a segfault in strdup when it wasn't, by luck, > zero. > > Fix it by explicitely initializing it to NULL.
Thank you for fixing my fault.
Reviewed-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
| |