Skip to content
Browse files

Free earlier

  • Loading branch information...
1 parent e6fdf49 commit 6072a01c6339c3b2b01aae54ee6c474d4f5a3671 @drbrain committed Mar 25, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 ext/pasteboard/pasteboard.c
View
4 ext/pasteboard/pasteboard.c
@@ -248,15 +248,15 @@ pb_copy_item_flavor_data(VALUE self, VALUE identifier, VALUE flavor) {
data = rb_str_new(buffer, data_length);
+ free(buffer);
+
encodings = rb_const_get_at(
rb_const_get_at(cPB, rb_intern("Type")), rb_intern("Encodings"));
encoding = rb_hash_aref(encodings, flavor);
rb_enc_associate(data, rb_to_encoding(encoding));
- free(buffer);
-
return data;
}

0 comments on commit 6072a01

Please sign in to comment.
Something went wrong with that request. Please try again.