if (AllocAndLoadString(&lpUsage, GetModuleHandle(NULL), IDS_USAGE)) {
_putts(lpUsage);
+ LocalFree(lpUsage);
}
}
}
default:
//Invalid parameter detected
- if (AllocAndLoadString(&lpIllegalMsg, GetModuleHandle(NULL), IDS_ILLEGAL_PARAM))
- _putts(lpIllegalMsg);
+ if (AllocAndLoadString(&lpIllegalMsg, GetModuleHandle(NULL), IDS_ILLEGAL_PARAM)) {
+ _putts(lpIllegalMsg);
+ LocalFree(lpIllegalMsg);
+ }
return FALSE;
}
}