Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=3d08b0971f5f261045934…
Commit: 3d08b0971f5f2610459343d0ae2a524d272142d2
Parent: ad286a32275283f018adabbf96d569d5c1fd065a
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Jun 30 19:36:24 2017 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Jun 30 20:39:02 2017 +0200
man_generator: release buffer after use
Although ATM this code has no memory management at all,
it will not make any harm to release some memory,
when it's not needed anymore.
---
tools/command.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/tools/command.c b/tools/command.c
index afd8831..c094f12 100644
--- a/tools/command.c
+++ b/tools/command.c
@@ -2279,6 +2279,7 @@ static void print_val_man(struct command_name *cname, int opt_enum, int val_enum
else
printf("\\fB%s\\fP", line_argv[i]);
}
+ dm_free(line);
return;
}
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=9348ad4f164a2d8806b08…
Commit: 9348ad4f164a2d8806b08f28a937aaa1041b4f6b
Parent: 674a93ffe3db8a21534c9b10d6fcb407258e191a
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Jun 30 12:07:30 2017 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Jun 30 12:12:16 2017 +0200
tests: aux prepares lvmdbusd
Correctly skip the test when lvmdbusd is found already running.
For pgrep usage we need to add '-f -l' options to get python3 name
printed.
Remove no longer used 'pids' local var.
---
test/lib/aux.sh | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 99e8a6d..ed969e2 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -309,9 +309,8 @@ prepare_lvmdbusd() {
# FIXME: This is not correct! Daemon is auto started.
echo "checking lvmdbusd is NOT running..."
- if pgrep lvmdbusd | grep python3; then
- echo "Cannot run while existing lvmdbusd process exists"
- return 1
+ if pgrep -f -l lvmdbusd | grep python3 ; then
+ skip "Cannot run while existing lvmdbusd process exists"
fi
echo ok
@@ -320,7 +319,7 @@ prepare_lvmdbusd() {
# NOTE: this is always present - additional checks are needed:
daemon="$abs_top_builddir/daemons/lvmdbusd/lvmdbusd"
# Setup the python path so we can run
- export PYTHONPATH=$abs_top_builddir/daemons
+ export PYTHONPATH="$abs_top_builddir/daemons"
else
daemon=$(which lvmdbusd || :)
fi
@@ -343,7 +342,7 @@ prepare_lvmdbusd() {
sleep 1
echo "checking lvmdbusd IS running..."
- if ! pgrep lvmdbusd | grep python3; then
+ if ! pgrep -f -l lvmdbusd | grep python3; then
echo "Failed to start lvmdbusd daemon"
return 1
fi
@@ -496,7 +495,6 @@ count_processes_with_tag() {
kill_tagged_processes() {
local pid
- local pids
local wait
# read uses all vars within pipe subshell