[util] Fix two other Coverity warnings

pull/522/head
Behdad Esfahbod 8 years ago
parent 356f93b64b
commit 3e44748ebe
  1. 4
      util/options.cc

@ -240,6 +240,8 @@ parse_features (const char *name G_GNUC_UNUSED,
} while (p);
shape_opts->features = (hb_feature_t *) calloc (shape_opts->num_features, sizeof (*shape_opts->features));
if (!shape_opts->features)
return false;
/* now do the actual parsing */
p = s;
@ -281,6 +283,8 @@ parse_variations (const char *name G_GNUC_UNUSED,
} while (p);
font_opts->variations = (hb_variation_t *) calloc (font_opts->num_variations, sizeof (*font_opts->variations));
if (!font_opts->variations)
return false;
/* now do the actual parsing */
p = s;

Loading…
Cancel
Save