~drizzle-trunk/drizzle/jenkins-Drizzle-Builder-187

« back to all changes in this revision

Viewing changes to drizzled/optimizer/range.cc

  • Committer: Mark Atwood
  • Date: 2011-06-30 07:03:08 UTC
  • mto: This revision was merged to the branch mainline in revision 2358.
  • Revision ID: me@mark.atwood.name-20110630070308-4380q6dqkkqv92w2
fix cppcheck redundantIfDelete0 warnings.  It is safe to deallocate a NULL pointer

Show diffs side-by-side

added added

removed removed

Lines of Context:
385
385
 
386
386
void optimizer::SqlSelect::cleanup()
387
387
{
388
 
  if (quick)
389
 
  {
390
 
    delete quick;
391
 
    quick= NULL;
392
 
  }
 
388
 
 
389
  delete quick;
 
390
  quick= NULL;
393
391
 
394
392
  if (free_cond)
395
393
  {
640
638
{
641
639
  uint32_t idx;
642
640
  double scan_time;
643
 
  if (quick)
644
 
  {
645
 
    delete quick;
646
 
    quick= NULL;
647
 
  }
 
641
 
 
642
  delete quick;
 
643
  quick= NULL;
 
644
 
648
645
  needed_reg.reset();
649
646
  quick_keys.reset();
650
647
  if (keys_to_use.none())
859
856
      records= best_trp->records;
860
857
      if (! (quick= best_trp->make_quick(&param, true)) || quick->init())
861
858
      {
862
 
        /* quick can already be free here */
863
 
        if (quick)
864
 
        {
865
 
          delete quick;
866
 
          quick= NULL;
867
 
        }
 
859
        delete quick;
 
860
        quick= NULL;
868
861
      }
869
862
    }
870
863