lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFERLOxwUSHFdJEMPpd7oyQD7Up3WVxNGOS7Q0GQNz--XCv65Q@mail.gmail.com>
Date:   Wed, 17 Jan 2018 16:31:50 +0530
From:   Jose Bale <jb1987212@...il.com>
To:     linux-kernel@...r.kernel.org
Subject: Fwd: Hi (Assigning NULL to variable after freeing it).

Hi All,

I have just started to contribute to linux kernel. I was thinking of
giving a patch where a variable is made null after free if not already
done.

Some thing like this:
Original code:
  kfree(x);
  ...........some other code...........

I will change this code to:
New code:
  kfree(x);
++ x = NULL;
  ...........some other code...........

Will this kind of code change be accepted by linux kernel?

Also, isn't doing this a better practice - that is, assigning NULL to
variable after freeing it? What is the best practice? What do people
think about it?

Any feedback / replies will be greatly appreciated.

Regards,
JB

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ