View Issue Details

IDProjectCategoryView StatusLast Update
00033363 - Current Dev ListBugpublic2019-09-07 09:08
ReporterK7ZCZAssigned ToDOUG 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version 
Target VersionFixed in Version6.7.0.226 
Summary0003336: LicenseManager class recreates, then leaks itself
DescriptionI noticed that the QLM License code instantiates the license manager twice. I'm not sure why it needs to do so.

The LicenseValdiator::ValidateOnServer() method is non-static. When called, it ends up executing this code:

     if ((activationKey.Length() > 0) && (computerKey.Length() > 0))
         LicenseValidator *lv = new LicenseValidator();
         _bstr_t _returnMsg = lv->license->ValidateLicense(_bstr_t(activationKey));
         licenseType = lv->license->LicenseType;

It seems odd that a method of LicenseValidator would create a new LicenseValidator, but that's what's happening here. Why?

If there's a good reason, that's fine; but it seems like something that should be commented and explained. I also have to wonder why the code leaks the locally created LicenseValidator instance; why doesn't it delete the object, or use a smart pointer object to manage its lifecycle?
TagsNo tags attached.
ModuleSW License Mgmt
Sub-ModuleSW License Client
Testing N/A



2019-06-10 23:37

developer   ~0008037

Agree, no idea why it was like that. Testing just use local method works fine so I changed it.

There is a comment there, but I think it was back when Eric was making a more complicated version of this.


2019-06-22 11:16

administrator   ~0008166

Is this fixed and checked-in?


2019-06-23 17:05

developer   ~0008182

yes, fixed and checked in and in the last few builds


2019-09-07 09:08

administrator   ~0008531

Taking the developer's account as valid.

Issue History

Date Modified Username Field Change
2019-06-08 09:03 K7ZCZ New Issue
2019-06-09 19:02 WA9PIE Module (select) => QLM
2019-06-09 19:04 WA9PIE Sub-Module (select) => Software License Key System
2019-06-10 23:37 DOUG Note Added: 0008037
2019-06-13 14:47 WA9PIE Module QLM => SW License Mgmt
2019-06-15 11:21 WA9PIE Sub-Module Software License Key System => SW License Client
2019-06-15 23:18 WA9PIE Assigned To => DOUG
2019-06-15 23:18 WA9PIE Status new => assigned
2019-06-22 11:16 WA9PIE Note Added: 0008166
2019-06-23 17:05 DOUG Status assigned => resolved
2019-06-23 17:05 DOUG Resolution open => fixed
2019-06-23 17:05 DOUG Note Added: 0008182
2019-08-07 02:49 WA9PIE Fixed in Version =>
2019-08-30 19:40 WA9PIE Fixed in Version =>
2019-09-07 09:08 WA9PIE Status resolved => closed
2019-09-07 09:08 WA9PIE Testing Not Started => N/A
2019-09-07 09:08 WA9PIE Note Added: 0008531