diff options
Diffstat (limited to 'libglusterfs/src/common-utils.c')
| -rw-r--r-- | libglusterfs/src/common-utils.c | 11 | 
1 files changed, 8 insertions, 3 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c index 311ed72d04c..8dc5141247e 100644 --- a/libglusterfs/src/common-utils.c +++ b/libglusterfs/src/common-utils.c @@ -668,9 +668,14 @@ gf_dump_config_flags ()  /* Define to the full name and version of this package. */  #ifdef PACKAGE_STRING          { -                char msg[128]; -                sprintf (msg, "package-string: %s", PACKAGE_STRING); -                gf_msg_plain_nomem (GF_LOG_ALERT, msg); +                char *msg = NULL; +                int   ret = -1; + +                ret = gf_asprintf (&msg, "package-string: %s", PACKAGE_STRING); +                if (ret >= 0) { +                        gf_msg_plain_nomem (GF_LOG_ALERT, msg); +                        GF_FREE (msg); +                }          }  #endif  | 
