catch error from as.*printf
This commit is contained in:
@@ -226,17 +226,18 @@ load_plugins(krb5_context context)
|
||||
continue;
|
||||
|
||||
path = NULL;
|
||||
ret = 0;
|
||||
#ifdef __APPLE__
|
||||
{ /* support loading bundles on MacOS */
|
||||
size_t len = strlen(n);
|
||||
if (len > 7 && strcmp(&n[len - 7], ".bundle") == 0)
|
||||
asprintf(&path, "%s/%s/Contents/MacOS/%.*s", *di, n, (int)(len - 7), n);
|
||||
ret = asprintf(&path, "%s/%s/Contents/MacOS/%.*s", *di, n, (int)(len - 7), n);
|
||||
}
|
||||
#endif
|
||||
if (path == NULL)
|
||||
asprintf(&path, "%s/%s", *di, n);
|
||||
if (ret < 0 || path == NULL)
|
||||
ret = asprintf(&path, "%s/%s", *di, n);
|
||||
|
||||
if (path == NULL) {
|
||||
if (ret < 0 || path == NULL) {
|
||||
ret = ENOMEM;
|
||||
krb5_set_error_message(context, ret, "malloc: out of memory");
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user