Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

memory leak [imported] #784

Closed
Closed
Assignees
@cmaglie

Description

This is Issue 784 moved from a Google Code project.
Added by 2012年01月10日T08:26:14.000Z by seb.ha...@gmail.com.
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Defect, Priority-Medium

Original description

In

FirmataClass::setFirmwareNameAndVersion(const char *name, byte major, byte minor)

is a

firmwareVersionVector = (byte *) malloc(firmwareVersionCount);

There should be a corresponding free()

in a (to be created) destructor:

FirmataClass::~FirmataClass()
{
if(firmwareVersionVector)
free(firmwareVersionVector);
}

The contructor should get a
firmwareVersionVector = 0;

and / or
the line could go:

if(firmwareVersionCount)
  • Sebastian Haase

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /