Print this page
5679 be_sort_list(): Possible null pointer dereference

*** 24,33 **** --- 24,34 ---- */ /* * Copyright 2013 Nexenta Systems, Inc. All rights reserved. * Copyright 2015 Toomas Soome <tsoome@me.com> + * Copyright 2015 Gary Mills */ /* * System includes */
*** 1176,1187 **** case BE_SUCCESS: /* the default sort is ascending date, no need to sort twice */ if (order == BE_SORT_UNSPECIFIED) order = BE_SORT_DATE; ! if (order != BE_SORT_DATE) ! be_sort(&be_nodes, order); print_nodes(be_name, dsets, snaps, parsable, be_nodes); break; case BE_ERR_BE_NOENT: if (be_name == NULL) --- 1177,1196 ---- case BE_SUCCESS: /* the default sort is ascending date, no need to sort twice */ if (order == BE_SORT_UNSPECIFIED) order = BE_SORT_DATE; ! if (order != BE_SORT_DATE) { ! err = be_sort(&be_nodes, order); ! if (err != BE_SUCCESS) { ! (void) fprintf(stderr, _("Unable to sort Boot " ! "Environment\n")); ! (void) fprintf(stderr, "%s\n", ! be_err_to_str(err)); ! break; ! } ! } print_nodes(be_name, dsets, snaps, parsable, be_nodes); break; case BE_ERR_BE_NOENT: if (be_name == NULL)