On 06/28/10 08:56 AM, Matt Keenan wrote:
Quick Code review request for :
Bug 16192 - auto-install core dumped when creating invalid size swap
or dump
http://defect.opensolaris.org/bz/show_bug.cgi?id=16192
Webrev :
http://cr.opensolaris.org/~mattman/bug-16192/
Whilst auto-install does core, it does not have any adverse affect on
the install as the install is in the process of failing/quitting
either way.
Problem occurs because nvlist_free() is being called on an nvlist
variable that was never allocated.
Solution is to assign NULL to nvlist variable prior to possible
allocation. If it gets allocated it will be non-null and thus can be
freed.
cheers
Matt
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
Hey Matt,
I have a couple issues and a suggestion.
Hope this helps!
Thanks. Joe
Issue:
---------
22 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
Issue:
------
1296 ti_ex_attrs = NULL;
and
1347 if (ti_ex_attrs != NULL) {
1348 nvlist_free(ti_ex_attrs);
1349 }
and
1383 if (ti_ex_attrs != NULL) {
1384 nvlist_free(ti_ex_attrs);
1385 }
Indentation seems off. Did you run "hg nits" ?
Suggestion:
-----------
nvlist_free is used to free other nvlists. Maybe it would be valuable
to initialized them to NULL on declaration and after each invocation
to nvlist_free.
e.g.:
1144 nvlist_t *ti_ex_attrs = NULL;
...
nvlist_free(ti_ex_attrs);
ti_ex_attrs = NULL;
Please check these too.
nvlist_free(ti_attrs);
nvlist_free(target_attrs);
nvlist_free(be_attrs);
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss