X Tutup
Skip to content

Checkmemleakautovar: fix crash and FP#2196

Merged
versat merged 2 commits intodanmar:masterfrom
rikardfalkeborn:for-memleak-crash
Sep 21, 2019
Merged

Checkmemleakautovar: fix crash and FP#2196
versat merged 2 commits intodanmar:masterfrom
rikardfalkeborn:for-memleak-crash

Conversation

@rikardfalkeborn
Copy link
Copy Markdown
Contributor

This fixes crashes found by daca where valueType() is NULL. Also,
somewhat related, it removes warnings when casting to a type that is
unknown to cppcheck, for example, there is no longer a warning for the
following code:

void* f() {
	void *x = malloc(1);
	return (mytype)x;
}

This fixes crashes found by daca where valueType() is NULL. Also,
somewhat related, it removes warnings when casting to a type that is
unknown to cppcheck, for example, there is no longer a warning for the
following code:

	void* f() {
		void *x = malloc(1);
		return (mytype)x;
	}
@versat
Copy link
Copy Markdown
Collaborator

versat commented Sep 20, 2019

You can rebase now.
It looks good to me, i think it can be merged when CI is happy.

@versat versat merged commit 46ac0d7 into danmar:master Sep 21, 2019
@rikardfalkeborn rikardfalkeborn deleted the for-memleak-crash branch September 21, 2019 13:59
jubnzv pushed a commit to jubnzv/cppcheck that referenced this pull request Nov 13, 2019
This fixes crashes found by daca where valueType() is NULL. Also,
somewhat related, it removes warnings when casting to a type that is
unknown to cppcheck, for example, there is no longer a warning for the
following code:

	void* f() {
		void *x = malloc(1);
		return (mytype)x;
	}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

X Tutup