summaryrefslogtreecommitdiff
path: root/shell-completion/zsh
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2015-06-01 11:32:39 +0200
committerMartin Pitt <martin.pitt@ubuntu.com>2015-06-01 12:04:37 +0200
commitd854ba50a82f28b776c670d27156f0e9881fde8a (patch)
tree9d33921ac92399c15fc79feb43899eeb21bd7082 /shell-completion/zsh
parent19672f1e5fd23ec3ea5b93b8268ae07f2b8e9645 (diff)
sd-device: fix invalid property strv pointers
In device_update_properties_bufs(), the strv is built from pointers into the single nul-terminated buf_nulstr string, to avoid allocating the key=value strings twice. However, we must not do that while building and GREEDY_REALLOC0()'ing buf_nulstr, as each time when this actually reallocates memory the pointers we wrote into buf_strv so far become invalid. So change the logic to first completely build the new buf_nulstr, and then iterate over it to pick out the pointers to the individual key=value strings for properties_strv. This fixes invalid environment for udev callouts.
Diffstat (limited to 'shell-completion/zsh')
0 files changed, 0 insertions, 0 deletions