mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
config: Ensure that stolen option list elements are released.
NewInputDeviceRequest steals the contents of option list elements but doesn't use the elements themselves for anything. Therefore the list elements need to be released always. Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
committed by
Peter Hutterer
parent
8d30aff4aa
commit
4114533db6
@@ -392,10 +392,10 @@ unwind:
|
||||
free(driver);
|
||||
free(name);
|
||||
free(config_info);
|
||||
while (!dev && (tmpo = options)) {
|
||||
while ((tmpo = options)) {
|
||||
options = tmpo->next;
|
||||
free(tmpo->key);
|
||||
free(tmpo->value);
|
||||
free(tmpo->key); /* NULL if dev != NULL */
|
||||
free(tmpo->value); /* NULL if dev != NULL */
|
||||
free(tmpo);
|
||||
}
|
||||
|
||||
|
||||
@@ -197,10 +197,10 @@ device_added(struct udev_device *udev_device)
|
||||
|
||||
unwind:
|
||||
free(config_info);
|
||||
while (!dev && (tmpo = options)) {
|
||||
while ((tmpo = options)) {
|
||||
options = tmpo->next;
|
||||
free(tmpo->key);
|
||||
free(tmpo->value);
|
||||
free(tmpo->key); /* NULL if dev != NULL */
|
||||
free(tmpo->value); /* NULL if dev != NULL */
|
||||
free(tmpo);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user