]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
blkid: use xalloc.h when possible
authorSami Kerola <kerolasa@iki.fi>
Thu, 21 Mar 2013 21:47:14 +0000 (21:47 +0000)
committerKarel Zak <kzak@redhat.com>
Tue, 26 Mar 2013 09:53:28 +0000 (10:53 +0100)
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
misc-utils/blkid.c

index 78e0a9383d04636116db436e7cefa1c118ccb10f..fd27da7f04aecf873f43f97d1495f205d33e139e 100644 (file)
@@ -49,6 +49,7 @@ extern int optind;
 
 #include "closestream.h"
 #include "ttyutils.h"
+#include "xalloc.h"
 
 const char *progname = "blkid";
 
@@ -703,8 +704,8 @@ int main(int argc, char **argv)
                        break;
                case 'L':
                        eval++;
-                       search_value = strdup(optarg);
-                       search_type = strdup("LABEL");
+                       search_value = xstrdup(optarg);
+                       search_type = xstrdup("LABEL");
                        break;
                case 'n':
                        fltr_type = list_to_types(optarg, &fltr_flag);
@@ -714,8 +715,8 @@ int main(int argc, char **argv)
                        break;
                case 'U':
                        eval++;
-                       search_value = strdup(optarg);
-                       search_type = strdup("UUID");
+                       search_value = xstrdup(optarg);
+                       search_type = xstrdup("UUID");
                        break;
                case 'i':
                        lowprobe |= LOWPROBE_TOPOLOGY;