Print this page
10132 smatch fixes for MDB
Reviewed by: Andy Fiddaman <andy@omniosce.org>

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/mdb/common/kmdb/kmdb_kvm.c
          +++ new/usr/src/cmd/mdb/common/kmdb/kmdb_kvm.c
↓ open down ↓ 2380 lines elided ↑ open up ↑
2381 2381                  pkm = mdb_list_prev(km);
2382 2382                  mdb_free(km, sizeof (kmt_module_t));
2383 2383          }
2384 2384  
2385 2385          if (!kmt_defbp_lock)
2386 2386                  kmt_defbp_destroy_all();
2387 2387  
2388 2388          if (kmt->kmt_trapmap != NULL)
2389 2389                  mdb_free(kmt->kmt_trapmap, BT_SIZEOFMAP(kmt->kmt_trapmax));
2390 2390  
2391      -        if (kmt != NULL)
2392      -                mdb_free(kmt, sizeof (kmt_data_t));
     2391 +        mdb_free(kmt, sizeof (kmt_data_t));
2393 2392  }
2394 2393  
2395 2394  static const mdb_tgt_ops_t kmt_ops = {
2396 2395          kmt_setflags,                           /* t_setflags */
2397 2396          (int (*)()) mdb_tgt_notsup,             /* t_setcontext */
2398 2397          kmt_activate,                           /* t_activate */
2399 2398          (void (*)()) mdb_tgt_nop,               /* t_deactivate */
2400 2399          kmt_periodic,                           /* t_periodic */
2401 2400          kmt_destroy,                            /* t_destroy */
2402 2401          kmt_name,                               /* t_name */
↓ open down ↓ 173 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX