GNU bug report logs - #75636
GTK memory leaks

Previous Next

Package: emacs;

Reported by: Pip Cet <pipcet <at> protonmail.com>

Date: Fri, 17 Jan 2025 20:16:01 UTC

Severity: normal

Done: Pip Cet <pipcet <at> protonmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Po Lu <luangruo <at> yahoo.com>, Pip Cet <pipcet <at> protonmail.com>
Cc: 75636 <at> debbugs.gnu.org
Subject: bug#75636: GTK memory leaks
Date: Mon, 3 Feb 2025 13:41:49 -0800
Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs <at> gnu.org> writes:

> 0 as the rhs of an assignment to a pointer variable is taken for a NULL
> pointer, so there's no issue with the existing code.  Indeed on many
> systems NULL is simply defined to 0.

Both are valid C and compilers won't complain, but it is better to use
the correct type.  This means using NULL as the rhs for pointers.

Conversely, we should _not_ use NULL as the rhs if not assigning to a
pointer.  Compilers will warn about that one, though.




This bug report was last modified 167 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.