qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH for-9.2] hw/arm/sbsa-ref: Don't leak string in sbsa_fdt_add_g


From: Richard Henderson
Subject: Re: [PATCH for-9.2] hw/arm/sbsa-ref: Don't leak string in sbsa_fdt_add_gic_node()
Date: Sun, 25 Aug 2024 22:13:52 +1000
User-agent: Mozilla Thunderbird

On 8/23/24 16:42, Philippe Mathieu-Daudé wrote:
  static void sbsa_fdt_add_gic_node(SBSAMachineState *sms)
  {
-    char *nodename;
+    const char *intc_nodename = "/intc";
+    const char *its_nodename = "/intc/its";

Should we use static qualifiers?'

No. The real object is the string literal. The local variable simply allows multiple references within the function.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]