Spelt / ZXing.Delphi

ZXing Barcode Scanning object Pascal Library for Delphi VCL and Delphi Firemonkey
Apache License 2.0
471 stars 206 forks source link

Memory leak in TUPCEANExtension5Support.decodeRow #148

Closed JedrzejczykRobert closed 1 year ago

JedrzejczykRobert commented 1 year ago

After apply #145 and like TUPCEANExtension2Support.decodeRow:

file: ZXing.OneD.UPCEANExtension5Support line: 123

current:

  if (extensionData <> nil)
  then
     extensionResult.putAllMetadata(extensionData);

should be:

  if (extensionData <> nil) then
  begin
    extensionResult.putAllMetadata(extensionData);
    FreeAndNil(extensionData);
  end;
Spelt commented 1 year ago

Thanks Robert,I will check your fixes out in a couple of weeks. Op 1 jul. 2023 om 18:16 heeft Robert Jędrzejczyk @.***> het volgende geschreven: After #145 and like TUPCEANExtension2Support.decodeRow: file: ZXing.OneD.UPCEANExtension5Support line: 123 current: if (extensionData <> nil) then extensionResult.putAllMetadata(extensionData); should be: if (extensionData <> nil) then begin extensionResult.putAllMetadata(extensionData); FreeAndNil(extensionData); end;

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>