]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
client: check for allocation errors in tab completition
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 8 Jun 2023 14:04:21 +0000 (16:04 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 8 Jun 2023 14:10:26 +0000 (16:10 +0200)
client.c

index 0790daf8cc343fc0b8e14b997191f22af4f204b6..97c842f0c800e9001a54ea17b4313600f00a7314 100644 (file)
--- a/client.c
+++ b/client.c
@@ -1167,7 +1167,7 @@ command_name_generator(const char *text, int state)
 
   while ((name = names[tab_complete_index][list_index++])) {
     if (strncmp(name, text, len) == 0) {
-      return strdup(name);
+      return Strdup(name);
     }
   }